diff --git a/backend/src/graphql/directive/isAuthorized.ts b/backend/src/graphql/directive/isAuthorized.ts index 5c6d6f6f0..84756c45a 100644 --- a/backend/src/graphql/directive/isAuthorized.ts +++ b/backend/src/graphql/directive/isAuthorized.ts @@ -9,7 +9,6 @@ import { getCustomRepository } from '@dbTools/typeorm' import { UserRepository } from '@repository/User' import { INALIENABLE_RIGHTS } from '@/auth/INALIENABLE_RIGHTS' import { ServerUser } from '@entity/ServerUser' -import { Context } from '@/server/context' const isAuthorized: AuthChecker = async ({ context }, rights) => { context.role = ROLE_UNAUTHORIZED // unauthorized user diff --git a/backend/src/server/context.ts b/backend/src/server/context.ts index 805be90c6..0958449a4 100644 --- a/backend/src/server/context.ts +++ b/backend/src/server/context.ts @@ -5,7 +5,7 @@ import { User as dbUser } from '@entity/User' export interface Context { token: string | null - setHeaders: { key: string, value: string }[] + setHeaders: { key: string; value: string }[] role?: Role user?: dbUser } diff --git a/backend/src/server/plugins.ts b/backend/src/server/plugins.ts index a407135ea..5902a415f 100644 --- a/backend/src/server/plugins.ts +++ b/backend/src/server/plugins.ts @@ -39,7 +39,6 @@ const apolloLogPlugin = ApolloLogPlugin({ }, }) -const plugins = - process.env.NODE_ENV === 'development' ? [setHeadersPlugin] : [setHeadersPlugin, apolloLogPlugin] +const plugins = process.env.NODE_ENV === 'development' ? [setHeadersPlugin] : [setHeadersPlugin] // , apolloLogPlugin export default plugins