Fix creating bot accounts

This commit is contained in:
Madeline
2022-12-24 16:28:00 +11:00
parent f856c58f4b
commit ac8ac9ada0
2 changed files with 16 additions and 5 deletions
+4 -1
View File
@@ -15,6 +15,7 @@ router.post("/", route({}), async (req: Request, res: Response) => {
const user = await User.register({
username: app.name,
password: undefined,
id: app.id,
req,
});
@@ -29,7 +30,9 @@ router.post("/", route({}), async (req: Request, res: Response) => {
await app.save();
res.send().status(204);
res.send({
token: await generateToken(user.id)
}).status(204);
});
router.post("/reset", route({}), async (req: Request, res: Response) => {