v3: code quality pass

This commit is contained in:
khannurien
2026-03-24 18:47:05 +00:00
parent cd4076343b
commit c293f3e706
39 changed files with 1464 additions and 1555 deletions

View File

@@ -48,7 +48,7 @@ router.post("/register", async (ctx) => {
// Mark invite as used only after the user row is committed
try {
await redeemInvite(body.inviteToken);
redeemInvite(body.inviteToken);
} catch (err) {
console.error("[register] redeemInvite failed (user created):", err);
}
@@ -123,11 +123,13 @@ router.get("/me", authMiddleware, (ctx: AuthContext) => {
);
}
const user = getUserById(ctx.state.user.userId);
const { passwordHash: _, ...publicUser } = getUserById(
ctx.state.user.userId,
);
ctx.response.body = {
success: true,
data: user,
data: publicUser,
};
} catch (err) {
console.error(err);