58 lines
1.9 KiB
TypeScript
58 lines
1.9 KiB
TypeScript
import { Injectable } from '@nestjs/common';
|
|
import { LoginService } from './login/login.service';
|
|
import { LogoutService } from './logout/logout.service';
|
|
import { SelectService } from './select/select.service';
|
|
import { userLoginValidator } from '@/src/auth/login/dtoValidator';
|
|
import { userSelectValidator } from './select/dtoValidator';
|
|
import { userLogoutValidator } from './logout/dtoValidator';
|
|
import { CreatePasswordService } from './password/create/create.service';
|
|
import { ResetPasswordService } from './password/reset/reset.service';
|
|
import { ChangePasswordService } from './password/change/change.service';
|
|
import { VerifyOtpService } from './password/verify-otp/verify-otp.service';
|
|
import { DisconnectService } from './disconnect/disconnect.service';
|
|
|
|
@Injectable()
|
|
export class AuthService {
|
|
constructor(
|
|
private loginService: LoginService,
|
|
private logoutService: LogoutService,
|
|
private selectService: SelectService,
|
|
private createPasswordService: CreatePasswordService,
|
|
private changePasswordService: ChangePasswordService,
|
|
private resetPasswordService: ResetPasswordService,
|
|
private verifyOtpService: VerifyOtpService,
|
|
private disconnectService: DisconnectService,
|
|
) {}
|
|
|
|
async login(dto: userLoginValidator) {
|
|
return await this.loginService.run(dto);
|
|
}
|
|
|
|
async logout(dto: userLogoutValidator) {
|
|
return await this.logoutService.run(dto);
|
|
}
|
|
|
|
async select(dto: userSelectValidator, req: Request) {
|
|
return await this.selectService.run(dto, req);
|
|
}
|
|
|
|
async createPassword(dto: any) {
|
|
return await this.createPasswordService.run(dto);
|
|
}
|
|
|
|
async changePassword(dto: any, req: Request) {
|
|
return await this.changePasswordService.run(dto, req);
|
|
}
|
|
|
|
async resetPassword(dto: any) {
|
|
return await this.resetPasswordService.run(dto);
|
|
}
|
|
|
|
async verifyOtp(dto: any) {
|
|
return await this.verifyOtpService.run(dto);
|
|
}
|
|
async disconnect() {
|
|
return await this.disconnectService.run();
|
|
}
|
|
}
|