diff options
author | vantezzen <hello@vantezzen.io> | 2020-01-02 14:34:01 +0100 |
---|---|---|
committer | vantezzen <hello@vantezzen.io> | 2020-01-02 14:34:01 +0100 |
commit | f82ac3950db24a116fbe65c42f9dda97f6592928 (patch) | |
tree | ededbd49cd3e0f9d80c681907789f642e2ad7fd3 /app/Controllers/Http | |
parent | Update feautre list for 5.4.0 (diff) | |
parent | #17 Return HTTP 404 when no announcements available (diff) | |
download | ferdium-server-f82ac3950db24a116fbe65c42f9dda97f6592928.tar.gz ferdium-server-f82ac3950db24a116fbe65c42f9dda97f6592928.tar.zst ferdium-server-f82ac3950db24a116fbe65c42f9dda97f6592928.zip |
Merge branch 'master' of https://github.com/getferdi/ferdi-server
Diffstat (limited to 'app/Controllers/Http')
-rw-r--r-- | app/Controllers/Http/ServiceController.js | 11 | ||||
-rw-r--r-- | app/Controllers/Http/StaticController.js | 2 |
2 files changed, 1 insertions, 12 deletions
diff --git a/app/Controllers/Http/ServiceController.js b/app/Controllers/Http/ServiceController.js index 4a4a8c4..90055b6 100644 --- a/app/Controllers/Http/ServiceController.js +++ b/app/Controllers/Http/ServiceController.js | |||
@@ -179,17 +179,6 @@ class ServiceController { | |||
179 | }); | 179 | }); |
180 | } else { | 180 | } else { |
181 | // Update service info | 181 | // Update service info |
182 | const validation = await validateAll(request.all(), { | ||
183 | name: 'required', | ||
184 | }); | ||
185 | if (validation.fails()) { | ||
186 | return response.status(401).send({ | ||
187 | message: 'Invalid POST arguments', | ||
188 | messages: validation.messages(), | ||
189 | status: 401, | ||
190 | }); | ||
191 | } | ||
192 | |||
193 | const data = request.all(); | 182 | const data = request.all(); |
194 | const { | 183 | const { |
195 | id, | 184 | id, |
diff --git a/app/Controllers/Http/StaticController.js b/app/Controllers/Http/StaticController.js index cd3b752..265578f 100644 --- a/app/Controllers/Http/StaticController.js +++ b/app/Controllers/Http/StaticController.js | |||
@@ -272,7 +272,7 @@ class StaticController { | |||
272 | if (await fs.pathExists(announcement)) { | 272 | if (await fs.pathExists(announcement)) { |
273 | return response.download(announcement); | 273 | return response.download(announcement); |
274 | } | 274 | } |
275 | return response.send('No announcement found.'); | 275 | return response.status(404).send('No announcement found.'); |
276 | } | 276 | } |
277 | } | 277 | } |
278 | 278 | ||