Renamed the auth response call to ResponseAuth

ref #76
This commit is contained in:
2021-01-10 16:54:19 +01:00
parent 3deae2bfeb
commit 01e0d5b94d
4 changed files with 12 additions and 12 deletions

View File

@@ -5,7 +5,7 @@ import { InvalidCredentialsError, PasswordNeededError, UserDisabledError, UserNo
import { UsernameOrEmailNeededError } from '../../../errors/UserErrors';
import { JwtCreator } from '../../../jwtcreator';
import { User } from '../../entities/User';
import { Auth } from '../../responses/ResponseAuth';
import { ResponseAuth } from '../../responses/ResponseAuth';
/**
* This class is used to create auth credentials based on user credentials provided in a json body (post request).
@@ -42,8 +42,8 @@ export class CreateAuth {
/**
* Creates a new auth object based on this.
*/
public async toAuth(): Promise<Auth> {
let newAuth: Auth = new Auth();
public async toAuth(): Promise<ResponseAuth> {
let newAuth: ResponseAuth = new ResponseAuth();
if (this.email === undefined && this.username === undefined) {
throw new UsernameOrEmailNeededError();