mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
refactor(server): use ava (#4120)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
|
||||
import { SessionService } from '../../session';
|
||||
import { MAILER, MailService } from './mailer';
|
||||
import { NextAuthController } from './next-auth.controller';
|
||||
import { NextAuthOptionsProvider } from './next-auth-options';
|
||||
@@ -10,6 +11,7 @@ import { AuthService } from './service';
|
||||
@Module({
|
||||
providers: [
|
||||
AuthService,
|
||||
SessionService,
|
||||
AuthResolver,
|
||||
NextAuthOptionsProvider,
|
||||
MAILER,
|
||||
|
||||
@@ -43,7 +43,7 @@ export class TokenType {
|
||||
export class AuthResolver {
|
||||
constructor(
|
||||
private readonly config: Config,
|
||||
private auth: AuthService,
|
||||
private readonly auth: AuthService,
|
||||
private readonly session: SessionService
|
||||
) {}
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { DynamicModule, Provider, Type } from '@nestjs/common';
|
||||
import { APP_FILTER } from '@nestjs/core';
|
||||
import { DynamicModule, Type } from '@nestjs/common';
|
||||
|
||||
import { GqlModule } from '../graphql.module';
|
||||
import { ExceptionLogger } from '../middleware/exception-logger';
|
||||
import { AuthModule } from './auth';
|
||||
import { DocModule } from './doc';
|
||||
import { SyncModule } from './sync';
|
||||
@@ -39,11 +37,4 @@ switch (SERVER_FLAVOR) {
|
||||
break;
|
||||
}
|
||||
|
||||
const Providers: Provider[] = [
|
||||
{
|
||||
provide: APP_FILTER,
|
||||
useClass: ExceptionLogger,
|
||||
},
|
||||
];
|
||||
|
||||
export { BusinessModules, Providers };
|
||||
export { BusinessModules };
|
||||
|
||||
Reference in New Issue
Block a user