< Summary - Estud

Information
Class: Estud.Back.Features.Notifications.MarkNotificationsAsViewed.MarkNotificationsAsViewedController
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Notifications/MarkNotificationsAsViewed/MarkNotificationsAsViewedController.cs
Tag: 114_29044117136
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 23
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
MarkAsViewed()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Features/Notifications/MarkNotificationsAsViewed/MarkNotificationsAsViewedController.cs

#LineLine coverage
 1namespace Estud.Back.Features.Notifications.MarkNotificationsAsViewed;
 2
 3[ApiController, Authorize(Policies.MarkNotificationsAsViewed)]
 84public class MarkNotificationsAsViewedController(MarkNotificationsAsViewedService service) : ControllerBase
 5{
 6    /// <summary>
 7    /// Marcar Notificações como Lidas
 8    /// </summary>
 9    /// <remarks>
 10    /// Marca uma ou mais notificações como lidas para o usuário logado.
 11    /// </remarks>
 12    [HttpPut("notifications/mark-as-viewed")]
 13    [SwaggerResponseExample(200, typeof(ResponseExamples))]
 14    [SwaggerResponseExample(400, typeof(ErrorsExamples))]
 15    public async Task<IActionResult> MarkAsViewed([FromBody] MarkNotificationsAsViewedIn data)
 16    {
 817        var result = await service.MarkAsViewed(data);
 818        return result.Match<IActionResult>(Ok, BadRequest);
 819    }
 20}
 21
 22internal class ResponseExamples : ExamplesProvider<SuccessOut>;
 23internal class ErrorsExamples : ErrorExamplesProvider<InvalidNotificationId>;