🏗️」 wip: started fixing shit

This commit is contained in:
2025-10-24 15:07:33 +02:00
parent 71189c8dc2
commit 3a7033e554
12 changed files with 60 additions and 42 deletions

View File

@ -2,7 +2,6 @@ import fastifyJWT from '@fastify/jwt';
import fastifyCookie from '@fastify/cookie';
import cors from '@fastify/cors'
import Database from 'better-sqlite3';
import cors from '@fastify/cors';
import { gUsers } from './gUsers.js';
import { gUser } from './gUser.js';
@ -163,12 +162,6 @@ export default async function(fastify, options) {
},
});
fastify.register(fastifyCookie);
fastify.register(cors, {
origin: process.env.CORS_ORIGIN || 'http://localhost:5173',
credentials: true,
methods: [ "GET", "POST", "PATCH", "DELETE", "OPTIONS" ]
});
fastify.addContentTypeParser(
['image/jpeg', 'image/png', 'image/gif', 'image/webp'],
{ parseAs: 'buffer' },