mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-13 14:12:41 +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: gift_code_sku_id?
|
||||||
// TODO: check password strength
|
// 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);
|
await Invite.joinGuild(user.id, body.invite);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("register", body.email, body.username, ip);
|
||||||
|
|
||||||
return res.json({ token: await generateToken(user.id) });
|
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 user_id = req.user_id;
|
||||||
const timestamp = Date.now();
|
const timestamp = Date.now();
|
||||||
const channel = await Channel.findOneOrFail({ id: channel_id });
|
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({
|
await emitEvent({
|
||||||
event: "TYPING_START",
|
event: "TYPING_START",
|
||||||
|
Loading…
Reference in New Issue
Block a user