-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getEvents.js
63 lines (57 loc) · 2.53 KB
/
getEvents.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
async function getEvents(type) {
const today = new Date();
today.setHours(today.getHours() + 0.5);
switch (type) {
case 'hourly':
return [
{
title: 'Test Event 1',
startTime: today.toISOString(),
description:
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin augue nisi, fermentum vitae, imperdiet a, auctor eu, mi. Nulla imperdiet molestie purus. Duis arcu dui, pretium in, molestie id, convallis eget, orci. Praesent eget purus.',
link: 'https://virtualcoffee.io/events',
},
];
case 'daily':
const today2 = new Date();
today2.setHours(today2.getHours() + 2);
return [
{
title: 'Test Event 1',
startTime: today.toISOString(),
description:
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin augue nisi, fermentum vitae, imperdiet a, auctor eu, mi. Nulla imperdiet molestie purus. Duis arcu dui, pretium in, molestie id, convallis eget, orci. Praesent eget purus.',
link: 'https://virtualcoffee.io/events',
},
{
title: 'Test Event 2',
startTime: today2.toISOString(),
description:
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin augue nisi, fermentum vitae, imperdiet a, auctor eu, mi. Nulla imperdiet molestie purus. Duis arcu dui, pretium in, molestie id, convallis eget, orci. Praesent eget purus.',
link: 'https://virtualcoffee.io/events',
},
];
case 'weekly':
const tomorrow = new Date();
tomorrow.setHours(tomorrow.getHours() + 2);
return [
{
title: 'Test Event 1',
startTime: today.toISOString(),
description:
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin augue nisi, fermentum vitae, imperdiet a, auctor eu, mi. Nulla imperdiet molestie purus. Duis arcu dui, pretium in, molestie id, convallis eget, orci. Praesent eget purus.',
link: 'https://virtualcoffee.io/events',
},
{
title: 'Test Event 2',
startTime: tomorrow.toISOString(),
description:
'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin augue nisi, fermentum vitae, imperdiet a, auctor eu, mi. Nulla imperdiet molestie purus. Duis arcu dui, pretium in, molestie id, convallis eget, orci. Praesent eget purus.',
link: 'https://virtualcoffee.io/events',
},
];
default:
break;
}
}
module.exports = { getEvents };