Showing
1 changed file
with
49 additions
and
49 deletions
1 | function setKeywordsFlexMessage(keywords) { | 1 | function setKeywordsFlexMessage(keywords) { |
2 | - let flexMessage = { | 2 | + let flexMessage = { |
3 | - type: "bubble", | 3 | + type: "bubble", |
4 | - body: { | 4 | + body: { |
5 | - type: "box", | 5 | + type: "box", |
6 | - layout: "vertical", | 6 | + layout: "vertical", |
7 | - contents: [ | 7 | + contents: [ |
8 | - { | 8 | + { |
9 | - type: "text", | 9 | + type: "text", |
10 | - text: "매무리 봇", | 10 | + text: "매무리 봇", |
11 | - weight: "bold", | 11 | + weight: "bold", |
12 | - color: "#1DB446", | 12 | + color: "#1DB446", |
13 | - size: "sm", | 13 | + size: "sm", |
14 | - }, | ||
15 | - { | ||
16 | - type: "text", | ||
17 | - text: "등록된 키워드", | ||
18 | - weight: "bold", | ||
19 | - size: "xxl", | ||
20 | - margin: "md" | ||
21 | - }, | ||
22 | - { | ||
23 | - type: "separator", | ||
24 | - margin: "xxl" | ||
25 | - }, | ||
26 | - { | ||
27 | - type: "box", | ||
28 | - layout: "vertical", | ||
29 | - contents: [], | ||
30 | - margin: "md" | ||
31 | - } | ||
32 | - ] | ||
33 | }, | 14 | }, |
34 | - }; | 15 | + { |
16 | + type: "text", | ||
17 | + text: "등록된 키워드", | ||
18 | + weight: "bold", | ||
19 | + size: "xxl", | ||
20 | + margin: "md", | ||
21 | + }, | ||
22 | + { | ||
23 | + type: "separator", | ||
24 | + margin: "xxl", | ||
25 | + }, | ||
26 | + { | ||
27 | + type: "box", | ||
28 | + layout: "vertical", | ||
29 | + contents: [], | ||
30 | + margin: "md", | ||
31 | + }, | ||
32 | + ], | ||
33 | + }, | ||
34 | + }; | ||
35 | 35 | ||
36 | - for (let i = 0; i < keywords.length; i++) { | 36 | + for (let i = 0; i < keywords.length; i++) { |
37 | - const textbox = createKeywordTextBox(keywords[i]); | 37 | + const textbox = createKeywordTextBox(keywords[i]); |
38 | - flexMessage.body.contents[3].contents.push(textbox); | 38 | + flexMessage.body.contents[3].contents.push(textbox); |
39 | - } | 39 | + } |
40 | 40 | ||
41 | - return { | 41 | + return { |
42 | - type: "flex", | 42 | + type: "flex", |
43 | - altText: "키워드 조회 오류", | 43 | + altText: "매무리 키워드 확인", |
44 | - contents: flexMessage | 44 | + contents: flexMessage, |
45 | - } | 45 | + }; |
46 | } | 46 | } |
47 | 47 | ||
48 | function createKeywordTextBox(keyword) { | 48 | function createKeywordTextBox(keyword) { |
49 | - return { | 49 | + return { |
50 | - type: "text", | 50 | + type: "text", |
51 | - text: keyword, | 51 | + text: keyword, |
52 | - size: "lg", | 52 | + size: "lg", |
53 | - align: "center", | 53 | + align: "center", |
54 | - margin: "md" | 54 | + margin: "md", |
55 | - } | 55 | + }; |
56 | } | 56 | } |
57 | 57 | ||
58 | -module.exports = setKeywordsFlexMessage; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
58 | +module.exports = setKeywordsFlexMessage; | ... | ... |
-
Please register or login to post a comment