chore: Flag users with platform used

This commit is contained in:
Tom Moor
2022-09-18 17:53:55 -04:00
parent ae697339ac
commit f8912732b8
6 changed files with 32 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
import Koa, { DefaultContext, DefaultState } from "koa";
import Koa, { BaseContext, DefaultContext, DefaultState } from "koa";
import bodyParser from "koa-body";
import Router from "koa-router";
import userAgent, { UserAgentContext } from "koa-useragent";
import env from "@server/env";
import { NotFoundError } from "@server/errors";
import errorHandling from "@server/middlewares/errorHandling";
@@ -50,6 +51,7 @@ api.use(
},
})
);
api.use<BaseContext, UserAgentContext>(userAgent);
api.use(methodOverride());
api.use(apiWrapper());
api.use(editor());