| Class: | Api.Auth.Setup |
|---|---|
| Assembly: | Api |
| File(s): | /home/runner/work/ProjectRead.ing/ProjectRead.ing/Api/Auth/Setup.cs |
| Covered lines: | 8 |
|---|---|
| Uncovered lines: | 0 |
| Coverable lines: | 8 |
| Total lines: | 24 |
| Line coverage: | 100% |
| Covered branches: | 0 |
|---|---|
| Total branches: | 0 |
| Branch coverage: | N/A |
Feature is only available for sponsors
Upgrade to PRO version| Method | Branch coverage | Crap Score | Cyclomatic complexity | Line coverage |
|---|---|---|---|---|
| RegisterServices(...) | 100% | 1 | 1 | 100% |
| MapEndpoints(...) | 100% | 1 | 1 | 100% |
| # | Line | Line coverage | ||
|---|---|---|---|---|
1 | // SPDX-FileCopyrightText: 2026 Alper Çelik <[email protected]> | |||
2 | // | |||
3 | // SPDX-License-Identifier: AGPL-3.0-or-later | |||
4 | | |||
5 | using Api.Auth.Utils; | |||
6 | | |||
7 | namespace Api.Auth; | |||
8 | | |||
9 | public static class Setup | |||
10 | { | |||
11 | public static void RegisterServices(IServiceCollection services) | |||
| 1 | 12 | { | ||
| 1 | 13 | services.AddScoped<ICurrentUserId, CurrentUserId>(); | ||
| 1 | 14 | services.AddHttpContextAccessor(); | ||
| 1 | 15 | } | ||
16 | | |||
17 | public static void MapEndpoints(IEndpointRouteBuilder route) | |||
| 1 | 18 | { | ||
| 1 | 19 | Endpoints.LoginEndpoints.Map(route); | ||
| 1 | 20 | Endpoints.RegisterEndpoints.Map(route); | ||
21 | | |||
22 | | |||
| 1 | 23 | } | ||
24 | } |