< Summary

Information
Class: Syki.Back.Features.Academic.CrossLogin.CrossLoginController
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Features/Academic/CrossLogin/CrossLoginController.cs
Tag: 22_11348620282
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 22
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%
Login()100%11100%

File(s)

/home/runner/work/syki/syki/Back/Features/Academic/CrossLogin/CrossLoginController.cs

#LineLine coverage
 1using Syki.Back.Auth;
 2
 3namespace Syki.Back.Features.Academic.CrossLogin;
 4
 5/// <summary>
 6/// Realiza o login a partir do Acadêmico, indo para conta de um Aluno ou Professor da instituição.
 7/// </summary>
 8[ApiController, AuthAcademic]
 9[EnableRateLimiting("Medium")]
 10[Consumes("application/json"), Produces("application/json")]
 411public class CrossLoginController(CrossLoginService service) : ControllerBase
 12{
 13    [Authorize(BackPolicy.CrossLogin)]
 14    [HttpPost("academic/cross-login")]
 15    [ProducesResponseType(200)]
 16    public async Task<IActionResult> Login([FromBody] CrossLoginIn data)
 17    {
 418        var result = await service.Login(User.InstitutionId(), data);
 19
 420        return result.Match<IActionResult>(Ok, BadRequest);
 421    }
 22}