refactor(server): use ava (#4120)

This commit is contained in:
Alex Yang
2023-09-01 14:41:29 -05:00
committed by GitHub
parent 8845bb9b4b
commit eb1a21265f
19 changed files with 1313 additions and 952 deletions

View File

@@ -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,

View File

@@ -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
) {}

View File

@@ -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 };