chore: Remove method override middleware (#4315)

* chore: Remove method override middleware

* wip

* CodeQL

* max/min
This commit is contained in:
Tom Moor
2022-10-18 19:03:25 -04:00
committed by GitHub
parent 0da46321b8
commit 87e3f18e6d
32 changed files with 185 additions and 192 deletions

View File

@@ -9,7 +9,7 @@ import pagination from "./middlewares/pagination";
const router = new Router();
router.post("apiKeys.create", auth({ member: true }), async (ctx) => {
const { name } = ctx.body;
const { name } = ctx.request.body;
assertPresent(name, "name is required");
const { user } = ctx.state;
@@ -58,7 +58,7 @@ router.post(
);
router.post("apiKeys.delete", auth({ member: true }), async (ctx) => {
const { id } = ctx.body;
const { id } = ctx.request.body;
assertUuid(id, "id is required");
const { user } = ctx.state;
const key = await ApiKey.findByPk(id);