feat: move logo and avatars to local upload

This commit is contained in:
Daniel Luiz Alves
2025-03-14 13:14:30 -03:00
parent fb4ef5438d
commit 168eae3294
22 changed files with 571 additions and 154 deletions

View File

@@ -14,15 +14,13 @@ export class AuthController {
isAdmin: user.isAdmin,
});
// Set token in HTTP-only cookie
reply.setCookie("token", token, {
httpOnly: true,
path: "/",
secure: process.env.NODE_ENV === "production", // Only send over HTTPS in production
sameSite: "strict", // Protect against CSRF
secure: process.env.NODE_ENV === "production",
sameSite: "strict",
});
// Return only user data
return reply.send({ user });
} catch (error: any) {
return reply.status(400).send({ error: error.message });