09041953
This commit is contained in:
parent
0b01572389
commit
baa376d436
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue