This commit is contained in:
longdayi 2024-09-04 19:53:52 +08:00
parent 0b01572389
commit baa376d436
1 changed files with 0 additions and 2 deletions

View File

@ -2,11 +2,9 @@ import { Injectable } from '@nestjs/common';
import { TrpcService } from '@server/trpc/trpc.service'; import { TrpcService } from '@server/trpc/trpc.service';
import { AuthService } from './auth.service'; import { AuthService } from './auth.service';
import { AuthSchema } from '@nicestack/common'; import { AuthSchema } from '@nicestack/common';
@Injectable() @Injectable()
export class AuthRouter { export class AuthRouter {
constructor(private readonly trpc: TrpcService, private readonly authService: AuthService) { } constructor(private readonly trpc: TrpcService, private readonly authService: AuthService) { }
router = this.trpc.router({ router = this.trpc.router({
login: this.trpc.procedure.input(AuthSchema.signInRequset).mutation(({ input }) => { login: this.trpc.procedure.input(AuthSchema.signInRequset).mutation(({ input }) => {
return this.authService.signIn(input); return this.authService.signIn(input);