fix request typing in tests

This commit is contained in:
2019-01-12 23:52:09 +03:00
parent a3122cbf41
commit 562283ebfc
2 changed files with 4 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ docsRouter.post("/docs/new", async ctx => {
const { user } = ctx.state;
const { name, content } = ctx.request.body as {
const { name, content } = (ctx.request as any).body as {
name: string | undefined;
content: string | undefined;
};
@@ -54,7 +54,7 @@ docsRouter.patch("/docs/byID/:id", async ctx => {
ctx.throw(400);
}
const { name, content } = ctx.request.body as {
const { name, content } = (ctx.request as any).body as {
name: string | undefined;
content: string | undefined;
};

View File

@@ -16,7 +16,7 @@ userRouter.get("/users/user", async ctx => {
});
userRouter.post("/users/login", async ctx => {
const request = ctx.request;
const request = ctx.request as any;
if (!request.body) {
ctx.throw(400);
@@ -39,7 +39,7 @@ userRouter.post("/users/login", async ctx => {
});
userRouter.post("/users/signup", async ctx => {
const request = ctx.request;
const request = ctx.request as any;
if (!request.body) {
ctx.throw(400);