aboutsummaryrefslogtreecommitdiffstats
path: root/app/Controllers/Http/StaticController.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <properly@protonmail.com>2019-09-05 11:22:49 +0200
committerLibravatar vantezzen <properly@protonmail.com>2019-09-05 11:22:49 +0200
commit29b8334b060dc0c05a509d523ead4b3a30229fef (patch)
tree4dbfcfb90a3eff31acd219b27557bbdc594f589f /app/Controllers/Http/StaticController.js
parentAdd cookie notice to login page (diff)
downloadferdium-server-29b8334b060dc0c05a509d523ead4b3a30229fef.tar.gz
ferdium-server-29b8334b060dc0c05a509d523ead4b3a30229fef.tar.zst
ferdium-server-29b8334b060dc0c05a509d523ead4b3a30229fef.zip
Add eslint
Diffstat (limited to 'app/Controllers/Http/StaticController.js')
-rw-r--r--app/Controllers/Http/StaticController.js347
1 files changed, 173 insertions, 174 deletions
diff --git a/app/Controllers/Http/StaticController.js b/app/Controllers/Http/StaticController.js
index 17b641f..b16e6cb 100644
--- a/app/Controllers/Http/StaticController.js
+++ b/app/Controllers/Http/StaticController.js
@@ -1,4 +1,4 @@
1'use strict' 1
2/** 2/**
3 * Controller for routes with static responses 3 * Controller for routes with static responses
4 */ 4 */
@@ -6,220 +6,219 @@
6class StaticController { 6class StaticController {
7 // Enable all features 7 // Enable all features
8 features({ 8 features({
9 response 9 response,
10 }) { 10 }) {
11 return response.send({ 11 return response.send({
12 "needToWaitToProceed": false, 12 needToWaitToProceed: false,
13 "isSpellcheckerPremiumFeature": true, 13 isSpellcheckerPremiumFeature: true,
14 "isServiceProxyEnabled": true, 14 isServiceProxyEnabled: true,
15 "isServiceProxyPremiumFeature": true, 15 isServiceProxyPremiumFeature: true,
16 "isWorkspacePremiumFeature": true, 16 isWorkspacePremiumFeature: true,
17 "isWorkspaceEnabled": true, 17 isWorkspaceEnabled: true,
18 "isAnnouncementsEnabled": true, 18 isAnnouncementsEnabled: true,
19 "isSettingsWSEnabled": false, 19 isSettingsWSEnabled: false,
20 "isServiceLimitEnabled": false, 20 isServiceLimitEnabled: false,
21 "serviceLimitCount": 0, 21 serviceLimitCount: 0,
22 "isCommunityRecipesPremiumFeature": false 22 isCommunityRecipesPremiumFeature: false,
23 }) 23 });
24 } 24 }
25 25
26 // Return an empty array 26 // Return an empty array
27 emptyArray({ 27 emptyArray({
28 response 28 response,
29 }) { 29 }) {
30 return response.send([]) 30 return response.send([]);
31 } 31 }
32 32
33 // Payment plans availible 33 // Payment plans availible
34 plans({ 34 plans({
35 response 35 response,
36 }) { 36 }) {
37 return response.send({ 37 return response.send({
38 "month": { 38 month: {
39 "id": "franz-supporter-license", 39 id: 'franz-supporter-license',
40 "price": 99 40 price: 99,
41 }, 41 },
42 "year": { 42 year: {
43 "id": "franz-supporter-license-year-2019", 43 id: 'franz-supporter-license-year-2019',
44 "price": 99 44 price: 99,
45 } 45 },
46 }) 46 });
47 } 47 }
48 48
49 // Return list of popular recipes (copy of the response Franz's API is returning) 49 // Return list of popular recipes (copy of the response Franz's API is returning)
50 popularRecipes({ 50 popularRecipes({
51 response 51 response,
52 }) { 52 }) {
53 return response.send([{ 53 return response.send([{
54 "author": "Stefan Malzner <stefan@adlk.io>", 54 author: 'Stefan Malzner <stefan@adlk.io>',
55 "featured": false, 55 featured: false,
56 "id": "slack", 56 id: 'slack',
57 "name": "Slack", 57 name: 'Slack',
58 "version": "1.0.4", 58 version: '1.0.4',
59 "icons": { 59 icons: {
60 "png": "https://cdn.franzinfra.com/recipes/dist/slack/src/icon.png", 60 png: 'https://cdn.franzinfra.com/recipes/dist/slack/src/icon.png',
61 "svg": "https://cdn.franzinfra.com/recipes/dist/slack/src/icon.svg" 61 svg: 'https://cdn.franzinfra.com/recipes/dist/slack/src/icon.svg',
62 } 62 },
63 }, { 63 }, {
64 "author": "Stefan Malzner <stefan@adlk.io>", 64 author: 'Stefan Malzner <stefan@adlk.io>',
65 "featured": false, 65 featured: false,
66 "id": "whatsapp", 66 id: 'whatsapp',
67 "name": "WhatsApp", 67 name: 'WhatsApp',
68 "version": "1.0.1", 68 version: '1.0.1',
69 "icons": { 69 icons: {
70 "png": "https://cdn.franzinfra.com/recipes/dist/whatsapp/src/icon.png", 70 png: 'https://cdn.franzinfra.com/recipes/dist/whatsapp/src/icon.png',
71 "svg": "https://cdn.franzinfra.com/recipes/dist/whatsapp/src/icon.svg" 71 svg: 'https://cdn.franzinfra.com/recipes/dist/whatsapp/src/icon.svg',
72 } 72 },
73 }, { 73 }, {
74 "author": "Stefan Malzner <stefan@adlk.io>", 74 author: 'Stefan Malzner <stefan@adlk.io>',
75 "featured": false, 75 featured: false,
76 "id": "messenger", 76 id: 'messenger',
77 "name": "Messenger", 77 name: 'Messenger',
78 "version": "1.0.6", 78 version: '1.0.6',
79 "icons": { 79 icons: {
80 "png": "https://cdn.franzinfra.com/recipes/dist/messenger/src/icon.png", 80 png: 'https://cdn.franzinfra.com/recipes/dist/messenger/src/icon.png',
81 "svg": "https://cdn.franzinfra.com/recipes/dist/messenger/src/icon.svg" 81 svg: 'https://cdn.franzinfra.com/recipes/dist/messenger/src/icon.svg',
82 } 82 },
83 }, { 83 }, {
84 "author": "Stefan Malzner <stefan@adlk.io>", 84 author: 'Stefan Malzner <stefan@adlk.io>',
85 "featured": false, 85 featured: false,
86 "id": "telegram", 86 id: 'telegram',
87 "name": "Telegram", 87 name: 'Telegram',
88 "version": "1.0.0", 88 version: '1.0.0',
89 "icons": { 89 icons: {
90 "png": "https://cdn.franzinfra.com/recipes/dist/telegram/src/icon.png", 90 png: 'https://cdn.franzinfra.com/recipes/dist/telegram/src/icon.png',
91 "svg": "https://cdn.franzinfra.com/recipes/dist/telegram/src/icon.svg" 91 svg: 'https://cdn.franzinfra.com/recipes/dist/telegram/src/icon.svg',
92 } 92 },
93 }, { 93 }, {
94 "author": "Stefan Malzner <stefan@adlk.io>", 94 author: 'Stefan Malzner <stefan@adlk.io>',
95 "featured": false, 95 featured: false,
96 "id": "gmail", 96 id: 'gmail',
97 "name": "Gmail", 97 name: 'Gmail',
98 "version": "1.0.0", 98 version: '1.0.0',
99 "icons": { 99 icons: {
100 "png": "https://cdn.franzinfra.com/recipes/dist/gmail/src/icon.png", 100 png: 'https://cdn.franzinfra.com/recipes/dist/gmail/src/icon.png',
101 "svg": "https://cdn.franzinfra.com/recipes/dist/gmail/src/icon.svg" 101 svg: 'https://cdn.franzinfra.com/recipes/dist/gmail/src/icon.svg',
102 } 102 },
103 }, { 103 }, {
104 "author": "Stefan Malzner <stefan@adlk.io>", 104 author: 'Stefan Malzner <stefan@adlk.io>',
105 "featured": false, 105 featured: false,
106 "id": "skype", 106 id: 'skype',
107 "name": "Skype", 107 name: 'Skype',
108 "version": "1.0.0", 108 version: '1.0.0',
109 "icons": { 109 icons: {
110 "png": "https://cdn.franzinfra.com/recipes/dist/skype/src/icon.png", 110 png: 'https://cdn.franzinfra.com/recipes/dist/skype/src/icon.png',
111 "svg": "https://cdn.franzinfra.com/recipes/dist/skype/src/icon.svg" 111 svg: 'https://cdn.franzinfra.com/recipes/dist/skype/src/icon.svg',
112 } 112 },
113 }, { 113 }, {
114 "author": "Stefan Malzner <stefan@adlk.io>", 114 author: 'Stefan Malzner <stefan@adlk.io>',
115 "featured": false, 115 featured: false,
116 "id": "hangouts", 116 id: 'hangouts',
117 "name": "Hangouts", 117 name: 'Hangouts',
118 "version": "1.0.0", 118 version: '1.0.0',
119 "icons": { 119 icons: {
120 "png": "https://cdn.franzinfra.com/recipes/dist/hangouts/src/icon.png", 120 png: 'https://cdn.franzinfra.com/recipes/dist/hangouts/src/icon.png',
121 "svg": "https://cdn.franzinfra.com/recipes/dist/hangouts/src/icon.svg" 121 svg: 'https://cdn.franzinfra.com/recipes/dist/hangouts/src/icon.svg',
122 } 122 },
123 }, { 123 }, {
124 "author": "Stefan Malzner <stefan@adlk.io>", 124 author: 'Stefan Malzner <stefan@adlk.io>',
125 "featured": false, 125 featured: false,
126 "id": "discord", 126 id: 'discord',
127 "name": "Discord", 127 name: 'Discord',
128 "version": "1.0.0", 128 version: '1.0.0',
129 "icons": { 129 icons: {
130 "png": "https://cdn.franzinfra.com/recipes/dist/discord/src/icon.png", 130 png: 'https://cdn.franzinfra.com/recipes/dist/discord/src/icon.png',
131 "svg": "https://cdn.franzinfra.com/recipes/dist/discord/src/icon.svg" 131 svg: 'https://cdn.franzinfra.com/recipes/dist/discord/src/icon.svg',
132 } 132 },
133 }, { 133 }, {
134 "author": "Stefan Malzner <stefan@adlk.io>", 134 author: 'Stefan Malzner <stefan@adlk.io>',
135 "featured": false, 135 featured: false,
136 "id": "tweetdeck", 136 id: 'tweetdeck',
137 "name": "Tweetdeck", 137 name: 'Tweetdeck',
138 "version": "1.0.1", 138 version: '1.0.1',
139 "icons": { 139 icons: {
140 "png": "https://cdn.franzinfra.com/recipes/dist/tweetdeck/src/icon.png", 140 png: 'https://cdn.franzinfra.com/recipes/dist/tweetdeck/src/icon.png',
141 "svg": "https://cdn.franzinfra.com/recipes/dist/tweetdeck/src/icon.svg" 141 svg: 'https://cdn.franzinfra.com/recipes/dist/tweetdeck/src/icon.svg',
142 } 142 },
143 }, { 143 }, {
144 "author": "Stefan Malzner <stefan@adlk.io>", 144 author: 'Stefan Malzner <stefan@adlk.io>',
145 "featured": false, 145 featured: false,
146 "id": "hipchat", 146 id: 'hipchat',
147 "name": "HipChat", 147 name: 'HipChat',
148 "version": "1.0.1", 148 version: '1.0.1',
149 "icons": { 149 icons: {
150 "png": "https://cdn.franzinfra.com/recipes/dist/hipchat/src/icon.png", 150 png: 'https://cdn.franzinfra.com/recipes/dist/hipchat/src/icon.png',
151 "svg": "https://cdn.franzinfra.com/recipes/dist/hipchat/src/icon.svg" 151 svg: 'https://cdn.franzinfra.com/recipes/dist/hipchat/src/icon.svg',
152 } 152 },
153 }, { 153 }, {
154 "author": "Stefan Malzner <stefan@adlk.io>", 154 author: 'Stefan Malzner <stefan@adlk.io>',
155 "featured": false, 155 featured: false,
156 "id": "gmailinbox", 156 id: 'gmailinbox',
157 "name": "Inbox by Gmail", 157 name: 'Inbox by Gmail',
158 "version": "1.0.0", 158 version: '1.0.0',
159 "icons": { 159 icons: {
160 "png": "https://cdn.franzinfra.com/recipes/dist/gmailinbox/src/icon.png", 160 png: 'https://cdn.franzinfra.com/recipes/dist/gmailinbox/src/icon.png',
161 "svg": "https://cdn.franzinfra.com/recipes/dist/gmailinbox/src/icon.svg" 161 svg: 'https://cdn.franzinfra.com/recipes/dist/gmailinbox/src/icon.svg',
162 } 162 },
163 }, { 163 }, {
164 "author": "Stefan Malzner <stefan@adlk.io>", 164 author: 'Stefan Malzner <stefan@adlk.io>',
165 "featured": false, 165 featured: false,
166 "id": "rocketchat", 166 id: 'rocketchat',
167 "name": "Rocket.Chat", 167 name: 'Rocket.Chat',
168 "version": "1.0.1", 168 version: '1.0.1',
169 "icons": { 169 icons: {
170 "png": "https://cdn.franzinfra.com/recipes/dist/rocketchat/src/icon.png", 170 png: 'https://cdn.franzinfra.com/recipes/dist/rocketchat/src/icon.png',
171 "svg": "https://cdn.franzinfra.com/recipes/dist/rocketchat/src/icon.svg" 171 svg: 'https://cdn.franzinfra.com/recipes/dist/rocketchat/src/icon.svg',
172 } 172 },
173 }, { 173 }, {
174 "author": "Brian Gilbert <brian@briangilbert.net>", 174 author: 'Brian Gilbert <brian@briangilbert.net>',
175 "featured": false, 175 featured: false,
176 "id": "gitter", 176 id: 'gitter',
177 "name": "Gitter", 177 name: 'Gitter',
178 "version": "1.0.0", 178 version: '1.0.0',
179 "icons": { 179 icons: {
180 "png": "https://cdn.franzinfra.com/recipes/dist/gitter/src/icon.png", 180 png: 'https://cdn.franzinfra.com/recipes/dist/gitter/src/icon.png',
181 "svg": "https://cdn.franzinfra.com/recipes/dist/gitter/src/icon.svg" 181 svg: 'https://cdn.franzinfra.com/recipes/dist/gitter/src/icon.svg',
182 } 182 },
183 }, { 183 }, {
184 "author": "Stefan Malzner <stefan@adlk.io>", 184 author: 'Stefan Malzner <stefan@adlk.io>',
185 "featured": false, 185 featured: false,
186 "id": "mattermost", 186 id: 'mattermost',
187 "name": "Mattermost", 187 name: 'Mattermost',
188 "version": "1.0.0", 188 version: '1.0.0',
189 "icons": { 189 icons: {
190 "png": "https://cdn.franzinfra.com/recipes/dist/mattermost/src/icon.png", 190 png: 'https://cdn.franzinfra.com/recipes/dist/mattermost/src/icon.png',
191 "svg": "https://cdn.franzinfra.com/recipes/dist/mattermost/src/icon.svg" 191 svg: 'https://cdn.franzinfra.com/recipes/dist/mattermost/src/icon.svg',
192 } 192 },
193 }, { 193 }, {
194 "author": "Franz <recipe@meetfranz.com>", 194 author: 'Franz <recipe@meetfranz.com>',
195 "featured": false, 195 featured: false,
196 "id": "toggl", 196 id: 'toggl',
197 "name": "toggl", 197 name: 'toggl',
198 "version": "1.0.0", 198 version: '1.0.0',
199 "icons": { 199 icons: {
200 "png": "https://cdn.franzinfra.com/recipes/dist/toggl/src/icon.png", 200 png: 'https://cdn.franzinfra.com/recipes/dist/toggl/src/icon.png',
201 "svg": "https://cdn.franzinfra.com/recipes/dist/toggl/src/icon.svg" 201 svg: 'https://cdn.franzinfra.com/recipes/dist/toggl/src/icon.svg',
202 } 202 },
203 }, { 203 }, {
204 "author": "Stuart Clark <stuart@realityloop.com>", 204 author: 'Stuart Clark <stuart@realityloop.com>',
205 "featured": false, 205 featured: false,
206 "id": "twist", 206 id: 'twist',
207 "name": "twist", 207 name: 'twist',
208 "version": "1.0.0", 208 version: '1.0.0',
209 "icons": { 209 icons: {
210 "png": "https://cdn.franzinfra.com/recipes/dist/twist/src/icon.png", 210 png: 'https://cdn.franzinfra.com/recipes/dist/twist/src/icon.png',
211 "svg": "https://cdn.franzinfra.com/recipes/dist/twist/src/icon.svg" 211 svg: 'https://cdn.franzinfra.com/recipes/dist/twist/src/icon.svg',
212 } 212 },
213 }]) 213 }]);
214 } 214 }
215 215
216 // Show announcements 216 // Show announcements
217 announcement({ 217 announcement({
218 response, 218 response,
219 params
220 }) { 219 }) {
221 return response.send('No announcement found.'); 220 return response.send('No announcement found.');
222 } 221 }
223} 222}
224 223
225module.exports = StaticController 224module.exports = StaticController;