From 6036556a37a64c1a61c52de3e60f1d9abdd16d79 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Fri, 11 Oct 2019 19:35:36 +0200 Subject: [PATCH] Fixing not working database/new admin endpoint --- package.json | 2 +- src/web/index.ts | 8 ++++---- views/forms.hbs | 37 ++++++++++++++++++++----------------- 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 11acfa1..054a1b6 100644 --- a/package.json +++ b/package.json @@ -45,4 +45,4 @@ "shortid": "^2.2.15", "ws": "^7.1.2" } -} \ No newline at end of file +} diff --git a/src/web/index.ts b/src/web/index.ts index 2e86058..73a80f8 100644 --- a/src/web/index.ts +++ b/src/web/index.ts @@ -6,11 +6,11 @@ import V1 from "./v1"; const Web = new koa(); -Web.use(RequestLog) +Web.use(RequestLog); Web.use(RequestError); -Web.use(BodyParser({})) +Web.use(BodyParser({})); -Web.use(V1.routes()) -Web.use(V1.allowedMethods()) +Web.use(V1.routes()); +Web.use(V1.allowedMethods()); export default Web; \ No newline at end of file diff --git a/views/forms.hbs b/views/forms.hbs index b9c56ef..6f1a6a8 100644 --- a/views/forms.hbs +++ b/views/forms.hbs @@ -29,24 +29,24 @@
{{#each fields}} -
- - {{#ifCond type "===" "text"}} - - {{/ifCond}} +
+ + {{#ifCond type "===" "text"}} + + {{/ifCond}} - {{#ifCond type "===" "number"}} - - {{/ifCond}} + {{#ifCond type "===" "number"}} + + {{/ifCond}} - {{#ifCond type "===" "boolean"}} - - {{/ifCond}} + {{#ifCond type "===" "boolean"}} + + {{/ifCond}} - {{#ifCond type "===" "textarea"}} - - {{/ifCond}} -
+ {{#ifCond type "===" "textarea"}} + + {{/ifCond}} +
{{/each}} @@ -55,14 +55,17 @@