chore: revert fastify change

This commit is contained in:
Eli Bosley
2025-03-04 16:07:33 -05:00
parent c20c7750a4
commit dbcedad039

View File

@@ -2,13 +2,9 @@ import type { NestFastifyApplication } from '@nestjs/platform-fastify';
import { NestFactory } from '@nestjs/core';
import { FastifyAdapter } from '@nestjs/platform-fastify';
import fastifyCookie from '@fastify/cookie';
import { LoggerErrorInterceptor, Logger as PinoLogger } from 'nestjs-pino';
import { apiLogger } from '@app/core/log.js';
import { LOG_LEVEL, PORT } from '@app/environment.js';
import { AppModule } from '@app/unraid-api/app/app.module.js';
@@ -17,10 +13,6 @@ import { CookieService } from '@app/unraid-api/auth/cookie.service.js';
import { GraphQLExceptionsFilter } from '@app/unraid-api/exceptions/graphql-exceptions.filter.js';
import { HttpExceptionFilter } from '@app/unraid-api/exceptions/http-exceptions.filter.js';
export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
apiLogger.debug('Creating Nest Server');
@@ -31,7 +23,7 @@ export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
const server = app.getHttpAdapter().getInstance();
await app.register(fastifyCookie as unknown as Parameters<NestFastifyApplication['register']>[0]); // parse cookies before cors
await app.register(fastifyCookie); // parse cookies before cors
const cookieService = app.get(CookieService);
app.enableCors(configureFastifyCors(cookieService));
@@ -66,4 +58,4 @@ export async function bootstrapNestServer(): Promise<NestFastifyApplication> {
apiLogger.info('Nest Server is now listening');
return app;
}
}