Updating dependencies
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Fabian Stamm
2020-08-14 11:55:43 +02:00
parent 794820e1d3
commit 5cbc445597
6 changed files with 843 additions and 644 deletions

View File

@ -4,18 +4,18 @@ import { DatabaseManager } from "../../database/database";
import {
NotFoundError,
NoPermissionError,
BadRequestError
BadRequestError,
} from "../helper/errors";
import Logging from "@hibas123/nodelogging";
import Session from "../../database/session";
import nanoid = require("nanoid");
import { nanoid } from "nanoid";
import { verifyJWT } from "../../helper/jwt";
import { QueryError } from "../../database/query";
const V1 = new Router({ prefix: "/v1" });
V1.use("/admin", AdminRoute.routes(), AdminRoute.allowedMethods());
V1.post("/db/:database/query", async ctx => {
V1.post("/db/:database/query", async (ctx) => {
const { database } = ctx.params;
const { accesskey, authkey, rootkey } = ctx.query;
@ -52,7 +52,7 @@ V1.post("/db/:database/query", async ctx => {
}
}
ctx.body = await db.run([query], session).catch(err => {
ctx.body = await db.run([query], session).catch((err) => {
if (err instanceof QueryError) {
throw new BadRequestError(err.message);
}