🔨」 fix(front): added exception catching

This commit is contained in:
2025-10-23 16:05:31 +02:00
parent d20597ee6a
commit f628b038d0
3 changed files with 20 additions and 21 deletions

View File

@ -59,9 +59,9 @@ const deleteFriends = database.prepare('DELETE FROM friends WHERE username = ?;'
export default async function(fastify, options) {
fastify.register(cors, {
origin: process.ENV.CORS_ORIGIN || 'http://localhost:5173',
origin: process.env.CORS_ORIGIN || 'http://localhost:5173',
credentials: true,
methods: [ "GET", "POST", "DELETE", "OPTIONS" ]
methods: [ "GET", "POST", "PATCH", "DELETE", "OPTIONS" ]
});
fastify.register(fastifyJWT, {