mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 05:02:37 +01:00
commit
d8733131b5
@ -98,7 +98,6 @@ router.post("/", route({ body: "RegisterSchema" }), async (req: Request, res: Re
|
||||
}
|
||||
}
|
||||
|
||||
console.log("register", body.email, body.username, ip);
|
||||
// TODO: gift_code_sku_id?
|
||||
// TODO: check password strength
|
||||
|
||||
@ -168,6 +167,8 @@ router.post("/", route({ body: "RegisterSchema" }), async (req: Request, res: Re
|
||||
await Invite.joinGuild(user.id, body.invite);
|
||||
}
|
||||
|
||||
console.log("register", body.email, body.username, ip);
|
||||
|
||||
return res.json({ token: await generateToken(user.id) });
|
||||
});
|
||||
|
||||
|
@ -9,7 +9,7 @@ router.post("/", route({ permission: "SEND_MESSAGES" }), async (req: Request, re
|
||||
const user_id = req.user_id;
|
||||
const timestamp = Date.now();
|
||||
const channel = await Channel.findOneOrFail({ id: channel_id });
|
||||
const member = await Member.findOneOrFail({ where: { id: user_id }, relations: ["roles"] });
|
||||
const member = await Member.findOneOrFail({ where: { id: user_id }, relations: ["roles", "user"] });
|
||||
|
||||
await emitEvent({
|
||||
event: "TYPING_START",
|
||||
|
Loading…
Reference in New Issue
Block a user