Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,785 changes: 1,747 additions & 38 deletions coverage/clover.xml

Large diffs are not rendered by default.

78 changes: 77 additions & 1 deletion coverage/coverage-final.json

Large diffs are not rendered by default.

467 changes: 451 additions & 16 deletions coverage/lcov-report/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion coverage/lcov-report/src/app.controller.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> app.con
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-02-24T15:53:17.618Z
at 2026-03-26T11:47:19.538Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
16 changes: 11 additions & 5 deletions coverage/lcov-report/src/app.module.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> app.mod
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/14</span>
<span class='fraction'>0/15</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> app.mod
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/12</span>
<span class='fraction'>0/13</span>
</div>


Expand Down Expand Up @@ -94,7 +94,9 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> app.mod
<a name='L29'></a><a href='#L29'>29</a>
<a name='L30'></a><a href='#L30'>30</a>
<a name='L31'></a><a href='#L31'>31</a>
<a name='L32'></a><a href='#L32'>32</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<a name='L32'></a><a href='#L32'>32</a>
<a name='L33'></a><a href='#L33'>33</a>
<a name='L34'></a><a href='#L34'>34</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
Expand All @@ -105,6 +107,8 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> app.mod
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand Down Expand Up @@ -132,10 +136,11 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> app.mod
<span class="cstat-no" title="statement not covered" >import { DatabaseModule } from './database/database.module';</span>
<span class="cstat-no" title="statement not covered" >import { AuthModule } from './auth/auth.module';</span>
<span class="cstat-no" title="statement not covered" >import { UsersModule } from './users/users.module';</span>
<span class="cstat-no" title="statement not covered" >import { MailModule } from './modules/mail/mail.module';</span>
<span class="cstat-no" title="statement not covered" >import configuration from './database/config';</span>
<span class="cstat-no" title="statement not covered" >import { LoggerModule } from './logger/logger.module';</span>
<span class="cstat-no" title="statement not covered" >import { ProjectsModule } from './projects/projects.module';</span>
<span class="cstat-no" title="statement not covered" >import { MailModule } from './mail/mail.module';</span>
<span class="cstat-no" title="statement not covered" >import { DonationsModule } from './donations/donations.module';</span>
&nbsp;
@Module({
imports: [
Expand All @@ -151,6 +156,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> app.mod
// Users module provides user-facing endpoints such as change-password
UsersModule,
ProjectsModule,
DonationsModule,
],
controllers: [AppController],
providers: [AppService],
Expand All @@ -163,7 +169,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> app.mod
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-02-24T15:53:17.618Z
at 2026-03-26T11:47:19.538Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lcov-report/src/app.service.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">src</a> app.ser
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-02-24T15:53:17.618Z
at 2026-03-26T11:47:19.538Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
154 changes: 119 additions & 35 deletions coverage/lcov-report/src/auth/auth.controller.ts.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Statements</span>
<span class='fraction'>0/25</span>
<span class='fraction'>0/26</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<div class='fl pad1y space-right2'>
<span class="strong">0% </span>
<span class="quiet">Lines</span>
<span class='fraction'>0/23</span>
<span class='fraction'>0/24</span>
</div>


Expand Down Expand Up @@ -166,7 +166,35 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<a name='L101'></a><a href='#L101'>101</a>
<a name='L102'></a><a href='#L102'>102</a>
<a name='L103'></a><a href='#L103'>103</a>
<a name='L104'></a><a href='#L104'>104</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<a name='L104'></a><a href='#L104'>104</a>
<a name='L105'></a><a href='#L105'>105</a>
<a name='L106'></a><a href='#L106'>106</a>
<a name='L107'></a><a href='#L107'>107</a>
<a name='L108'></a><a href='#L108'>108</a>
<a name='L109'></a><a href='#L109'>109</a>
<a name='L110'></a><a href='#L110'>110</a>
<a name='L111'></a><a href='#L111'>111</a>
<a name='L112'></a><a href='#L112'>112</a>
<a name='L113'></a><a href='#L113'>113</a>
<a name='L114'></a><a href='#L114'>114</a>
<a name='L115'></a><a href='#L115'>115</a>
<a name='L116'></a><a href='#L116'>116</a>
<a name='L117'></a><a href='#L117'>117</a>
<a name='L118'></a><a href='#L118'>118</a>
<a name='L119'></a><a href='#L119'>119</a>
<a name='L120'></a><a href='#L120'>120</a>
<a name='L121'></a><a href='#L121'>121</a>
<a name='L122'></a><a href='#L122'>122</a>
<a name='L123'></a><a href='#L123'>123</a>
<a name='L124'></a><a href='#L124'>124</a>
<a name='L125'></a><a href='#L125'>125</a>
<a name='L126'></a><a href='#L126'>126</a>
<a name='L127'></a><a href='#L127'>127</a>
<a name='L128'></a><a href='#L128'>128</a>
<a name='L129'></a><a href='#L129'>129</a>
<a name='L130'></a><a href='#L130'>130</a>
<a name='L131'></a><a href='#L131'>131</a>
<a name='L132'></a><a href='#L132'>132</a></td><td class="line-coverage quiet"><span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand All @@ -183,6 +211,12 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
Expand All @@ -206,7 +240,6 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand All @@ -215,6 +248,12 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand All @@ -228,6 +267,11 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand All @@ -237,6 +281,11 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand All @@ -248,6 +297,11 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand All @@ -263,6 +317,8 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-no">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
<span class="cline-any cline-neutral">&nbsp;</span>
Expand All @@ -285,90 +341,118 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
ApiOperation,
ApiResponse,
ApiBearerAuth,
ApiOkResponse,
ApiCreatedResponse,
ApiBadRequestResponse,
ApiUnauthorizedResponse,
ApiNotFoundResponse,
} from '@nestjs/swagger';
<span class="cstat-no" title="statement not covered" >import { AuthService } from './auth.service';</span>
<span class="cstat-no" title="statement not covered" >import { RegisterDto } from './dtos/register.dto';</span>
<span class="cstat-no" title="statement not covered" >import { LoginDto } from './dtos/login.dto';</span>
<span class="cstat-no" title="statement not covered" >import { VerifyEmailDto } from './dtos/verify-email.dto';</span>
<span class="cstat-no" title="statement not covered" >import { ResendVerificationDto } from './dtos/resend-verification.dto';</span>
<span class="cstat-no" title="statement not covered" >import { RefreshTokenDto } from './dtos/refresh-token.dto';</span>
import { AuthResponse } from './interfaces/auth.interface';
<span class="cstat-no" title="statement not covered" >import { RegisterDto } from './dto/register.dto';</span>
<span class="cstat-no" title="statement not covered" >import { LoginDto } from './dto/login.dto';</span>
<span class="cstat-no" title="statement not covered" >import { VerifyEmailDto } from './dto/verify-email.dto';</span>
<span class="cstat-no" title="statement not covered" >import { ResendVerificationDto } from './dto/resend-verification.dto';</span>
<span class="cstat-no" title="statement not covered" >import { RefreshTokenDto } from './dto/refresh-token.dto';</span>
<span class="cstat-no" title="statement not covered" >import { AuthResponseDto } from './dto/auth-response.dto';</span>
<span class="cstat-no" title="statement not covered" >import { AuthService } from './providers/auth.service';</span>
&nbsp;
@ApiTags('Auth')
@ApiTags('auth')
@ApiBearerAuth()
@Controller('auth')
export <span class="cstat-no" title="statement not covered" >class <span class="cstat-no" title="statement not covered" ><span class="cstat-no" title="statement not covered" >AuthController </span>{</span></span>
<span class="fstat-no" title="function not covered" > constructor(private readonly <span class="cstat-no" title="statement not covered" >a</span>uthService: A</span>uthService) {}
&nbsp;
//_____________________Endpoint to register a new user
@Post('register')
@ApiOperation({ summary: 'Register a new user' })
@ApiResponse({
status: 201,
@ApiCreatedResponse({
description: 'User registered successfully',
type: Object,
type: AuthResponseDto,
})
@ApiResponse({
status: 400,
@ApiBadRequestResponse({
description: 'Invalid input or user already exists',
})
async <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >register(</span>@Body() registerDto: RegisterDto): Promise&lt;AuthResponse&gt; {</span>
async <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >register(</span>@Body() registerDto: RegisterDto): Promise&lt;AuthResponseDto&gt; {</span>
<span class="cstat-no" title="statement not covered" > return this.authService.register(registerDto);</span>
}
&nbsp;
//_________________________ Endpoint to login with email and password
@Post('login')
@ApiOperation({ summary: 'Login with email and password' })
@ApiResponse({ status: 200, description: 'Login successful', type: Object })
@ApiResponse({ status: 401, description: 'Invalid credentials' })
@ApiOkResponse({
description: 'Login successful',
type: AuthResponseDto,
})
@ApiUnauthorizedResponse({
description: 'Invalid credentials',
})
async <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >login(</span></span>
@Body() loginDto: LoginDto,
@Request() req,
): Promise&lt;AuthResponse&gt; {
): Promise&lt;AuthResponseDto&gt; {
<span class="cstat-no" title="statement not covered" > return this.authService.login(loginDto, req);</span>
}
&nbsp;
@UseGuards(AuthGuard('jwt'))
@ApiBearerAuth('JWT-auth')
//_________________________ Endpoint to get current user profile (JWT required)
@Get('profile')
@UseGuards(AuthGuard('jwt'))
@ApiOperation({ summary: 'Get current user profile (JWT required)' })
@ApiResponse({ status: 200, description: 'Profile retrieved successfully' })
@ApiResponse({ status: 401, description: 'Unauthorized' })
@ApiOkResponse({
description: 'Profile retrieved successfully',
type: Object,
})
@ApiUnauthorizedResponse({
description: 'Unauthorized',
})
async <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >getProfile(</span>@Request() req) {</span>
<span class="cstat-no" title="statement not covered" > return req.user;</span>
}
&nbsp;
//_________________________ Endpoint to verify email with token
@Post('verify-email')
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: 'Verify email with token' })
@ApiResponse({ status: 200, description: 'Email verified successfully' })
@ApiResponse({ status: 400, description: 'Invalid or expired token' })
@ApiOkResponse({
description: 'Email verified successfully',
})
@ApiBadRequestResponse({
description: 'Invalid or expired token',
})
async <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >verifyEmail(</span></span>
@Body() verifyEmailDto: VerifyEmailDto,
): Promise&lt;{ message: string }&gt; {
<span class="cstat-no" title="statement not covered" > return this.authService.verifyEmail(verifyEmailDto);</span>
}
&nbsp;
//_________________________ Endpoint to resend email verification
@Post('resend-verification')
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: 'Resend email verification' })
@ApiResponse({ status: 200, description: 'Verification email sent' })
@ApiResponse({ status: 404, description: 'User not found' })
@ApiOkResponse({
description: 'Verification email sent',
})
@ApiNotFoundResponse({
description: 'User not found',
})
async <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >resendVerification(</span></span>
@Body() resendVerificationDto: ResendVerificationDto,
): Promise&lt;{ message: string }&gt; {
<span class="cstat-no" title="statement not covered" > return this.authService.resendVerification(resendVerificationDto);</span>
}
&nbsp;
//_________________________ Endpoint to refresh access token using refresh token (token rotation)
@Post('refresh')
@HttpCode(HttpStatus.OK)
@ApiOperation({ summary: 'Refresh access token' })
@ApiResponse({
status: 200,
@ApiOkResponse({
description: 'Token refreshed successfully',
type: Object,
type: AuthResponseDto,
})
@ApiUnauthorizedResponse({
description: 'Invalid refresh token',
})
@ApiResponse({ status: 401, description: 'Invalid refresh token' })
async <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >refreshToken(</span></span>
@Body() refreshTokenDto: RefreshTokenDto,
): Promise&lt;AuthResponse&gt; {
): Promise&lt;AuthResponseDto&gt; {
<span class="cstat-no" title="statement not covered" > return this.authService.refreshToken(refreshTokenDto);</span>
}
}
Expand All @@ -379,7 +463,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">src/auth</a>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2026-02-24T15:53:17.618Z
at 2026-03-26T11:47:19.538Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
Loading
Loading