This commit is contained in:
2025-12-21 19:53:22 +01:00
parent f2d8a23583
commit 3c64f328e2
105 changed files with 3191 additions and 1706 deletions

View File

@@ -8,26 +8,21 @@ export class AuthController {
@Post('signup')
async signup(@Body() params: SignupParams): Promise<AuthSessionDTO> {
const presenter = await this.authService.signupWithEmail(params);
return presenter.viewModel;
return this.authService.signupWithEmail(params);
}
@Post('login')
async login(@Body() params: LoginParams): Promise<AuthSessionDTO> {
const presenter = await this.authService.loginWithEmail(params);
return presenter.viewModel;
return this.authService.loginWithEmail(params);
}
@Get('session')
async getSession(): Promise<AuthSessionDTO | null> {
const presenter = await this.authService.getCurrentSession();
return presenter ? presenter.viewModel : null;
return this.authService.getCurrentSession();
}
@Post('logout')
async logout(): Promise<{ success: boolean }> {
const presenter = await this.authService.logout();
return presenter.viewModel;
return this.authService.logout();
}
}