mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor: register fastify-sentry directly (#50622)
This commit is contained in:
committed by
GitHub
parent
ea3eca975e
commit
30419c2e20
+1
-1
@@ -15,8 +15,8 @@ import type { TypeBoxTypeProvider } from '@fastify/type-provider-typebox';
|
||||
import fastifySwagger from '@fastify/swagger';
|
||||
import fastifySwaggerUI from '@fastify/swagger-ui';
|
||||
import fastifyCsrfProtection from '@fastify/csrf-protection';
|
||||
import fastifySentry from '@immobiliarelabs/fastify-sentry';
|
||||
|
||||
import fastifySentry from './plugins/fastify-sentry';
|
||||
import cors from './plugins/cors';
|
||||
import jwtAuthz from './plugins/fastify-jwt-authz';
|
||||
import security from './plugins/security';
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import Sentry, { SentryPluginOptions } from '@immobiliarelabs/fastify-sentry';
|
||||
import { FastifyPluginCallback } from 'fastify';
|
||||
import fp from 'fastify-plugin';
|
||||
|
||||
const fastifySentry: FastifyPluginCallback<SentryPluginOptions> = async (
|
||||
fastify,
|
||||
options
|
||||
) => {
|
||||
await fastify.register(Sentry, options);
|
||||
|
||||
fastify.log.info('Sentry plugin registered');
|
||||
};
|
||||
|
||||
export default fp(fastifySentry);
|
||||
Reference in New Issue
Block a user