aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2024-01-15 16:51:25 +0000
committerLibravatar GitHub <noreply@github.com>2024-01-15 16:51:25 +0000
commit3c965e7f922620970a76a8b19aac9833874a3ae2 (patch)
treec646d341212e47101667e35e2dc81e2a594853b2
parentUpgrade node to the latest LTS (20.11.0) and pnpm to the latest (8.14.1) (#93) (diff)
downloadferdium-server-3c965e7f922620970a76a8b19aac9833874a3ae2.tar.gz
ferdium-server-3c965e7f922620970a76a8b19aac9833874a3ae2.tar.zst
ferdium-server-3c965e7f922620970a76a8b19aac9833874a3ae2.zip
fix: new recipes not created correctly (#95)
* fix: new recipes not created correctly * fix lint
-rw-r--r--app/Controllers/Http/ServiceController.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Controllers/Http/ServiceController.ts b/app/Controllers/Http/ServiceController.ts
index e58ce33..76e72e4 100644
--- a/app/Controllers/Http/ServiceController.ts
+++ b/app/Controllers/Http/ServiceController.ts
@@ -24,9 +24,10 @@ export default class ServiceController {
24 } 24 }
25 25
26 // Validate user input 26 // Validate user input
27 let data; 27 const data = request.all();
28
28 try { 29 try {
29 data = await request.validate({ schema: createSchema }); 30 await request.validate({ schema: createSchema });
30 } catch (error) { 31 } catch (error) {
31 return response.status(401).send({ 32 return response.status(401).send({
32 message: 'Invalid POST arguments', 33 message: 'Invalid POST arguments',