chore: Flag users with platform used
This commit is contained in:
@@ -45,7 +45,7 @@ router.post("developer.create_test_users", dev(), auth(), async (ctx) => {
|
||||
|
||||
// Convert from invites to active users by marking as active
|
||||
await Promise.all(
|
||||
response.users.map((user) => user.updateActiveAt(ctx.request.ip, true))
|
||||
response.users.map((user) => user.updateActiveAt(ctx, true))
|
||||
);
|
||||
|
||||
ctx.body = {
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user