Skip to content

Commit 009137b

Browse files
author
Daniil Yankouski
committed
Added auth page
1 parent 07aa7bc commit 009137b

File tree

20 files changed

+40
-18
lines changed

20 files changed

+40
-18
lines changed

src/data/repositories/auth/auth.repo.impl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable } from 'containers/config';
2+
import { AuthTokenDto } from 'data/dto/auth/auth-token.dto';
23
import { AuthToken } from 'domain/auth/entities/auth-token.entity';
34
import { AuthRepository } from 'domain/auth/repository/auth.repo';
4-
import { AuthTokenDto } from 'dto/auth/auth-token.dto';
55
import { TokenResponse } from './token.response';
66

77
@Injectable()

src/presentation/forms/auth/auth.form.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ import { AuthService, AuthServiceType } from 'domain/auth/services';
66
import { ChangeForm } from '../base.form';
77
import { BaseFormImpl } from '../base.form.impl';
88

9+
export type AuthFormSubmitResponse = Promise<AuthToken>;
10+
911
@Injectable()
10-
export class AuthForm extends BaseFormImpl<AuthFormFields> {
12+
export class AuthForm extends BaseFormImpl<AuthFormFields, AuthFormSubmitResponse> {
1113
constructor(@Inject(AuthServiceType) private readonly _authService: AuthService) {
1214
super();
1315
}
@@ -23,7 +25,7 @@ export class AuthForm extends BaseFormImpl<AuthFormFields> {
2325
});
2426
}
2527

26-
handleSubmit = (values: AuthFormFields): Promise<AuthToken> => {
28+
handleSubmit = (values: AuthFormFields): AuthFormSubmitResponse => {
2729
return this._authService.login(values?.login, values?.password);
2830
};
2931

0 commit comments

Comments
 (0)