Skip to content

Commit

Permalink
fix(fastify): removed cors function there is a package called @fastif…
Browse files Browse the repository at this point in the history
…y/cors
  • Loading branch information
Stradivario committed Apr 3, 2024
1 parent 51c8e0b commit 7ce176e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
5 changes: 2 additions & 3 deletions packages/fastify/src/fastify.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Module, ModuleWithProviders } from '@rhtml/di';
import fastify, { FastifyInstance } from 'fastify';

import { Fastify, FastifyListen, FastifyModuleOptions } from './fastify.tokens';
import { addSchema, corsHook, globalErrorHandler, pipe } from './helpers';
import { addSchema, globalErrorHandler, pipe } from './helpers';

@Module()
export class FastifyModule {
Expand All @@ -26,8 +26,7 @@ export class FastifyModule {

return pipe(
addSchema(schemas),
globalErrorHandler(options.globalErrorHandler),
corsHook(options.cors)
globalErrorHandler(options.globalErrorHandler)
)(instance);
},
},
Expand Down
32 changes: 0 additions & 32 deletions packages/fastify/src/helpers/hooks/cors.hook.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/fastify/src/helpers/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './cors.hook';
export * from './add-schema.hook';
export * from './global-error.hook';

0 comments on commit 7ce176e

Please sign in to comment.