/
processYoga.js
66 lines (65 loc) · 1.59 KB
/
processYoga.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
64
65
66
const Axios = require("axios");
async function processYoga(event, context) {
await Axios.post(
`SLACK-WEBHOOK-URL`,
{
blocks: [
{
type: "section",
text: {
type: "mrkdwn",
text:
" :mega: Its a stretching time reminder, <https://arus.io|from the crunchy arus crew>",
},
},
{
type: "divider",
},
{
type: "context",
elements: [
{
type: "mrkdwn",
text: "*Step 1* \n Sit on the floor cross-legged.",
},
],
},
{
type: "context",
elements: [
{
type: "mrkdwn",
text:
"*Step 2* \n Stretch one arm up and learn to the opposite side.",
},
],
},
{
type: "context",
elements: [
{
type: "mrkdwn",
text: "*Step 3* \n Keep this posture for 30 seconds.",
},
],
},
{
type: "context",
elements: [
{
type: "mrkdwn",
text: "*Step 4* \n Repeat with the other arm.",
},
],
},
{
type: "image",
image_url:
"https://images.unsplash.com/photo-1597361768437-30aadb192d9a?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=970&q=80",
alt_text: "inspiration",
},
],
}
);
}
export const handler = processYoga;