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