lucas me pidio las lineas de codigo

This commit is contained in:
2025-01-29 01:59:16 -03:00
parent c7880b03b3
commit 72f277ab6c
14 changed files with 289 additions and 44 deletions

View File

@@ -8,7 +8,7 @@ namespace AlquilaFacil.Controllers;
public class LogsController: ControllerBase {
[HttpGet("/api/Logs")]
public IActionResult ObtenerLogs([FromHeader(Name = "Auth")] string Auth, long pag=1) {
public IActionResult ObtenerLogs([FromHeader(Name = "Auth")] string Auth, int pag=1) {
if (String.IsNullOrEmpty(Auth)) return Unauthorized();
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Informes");
if (validacion1 == false) return Unauthorized();
@@ -49,4 +49,14 @@ public class LogsController: ControllerBase {
}
return Ok(ll);
}
[HttpGet("/api/Logs/cantPag")]
public IActionResult cantidadPaginas([FromHeader(Name = "Auth")] string Auth){
if (String.IsNullOrEmpty(Auth)) return Unauthorized();
var validacion1 = RepositorioGrupos.Singleton.CheckGrupos(Auth, "Informes");
if (validacion1 == false) return Unauthorized();
int c = RepositorioLogs.Singleton.ObtenerCantidadPaginas();
return Ok(c);
}
}