funcionalidad de logs andando

This commit is contained in:
fede committed 2026-07-09 02:59:54 -03:00
1 parent 06ed4a518b
commit aac88856ac
21 files changed
+627 -31

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
package logs
import (
"net/http"
r "repuestera_back/repositorios"
"strconv"
"github.com/gin-gonic/gin"
)
func ObtenerLog(c *gin.Context) {
pag, err := strconv.ParseUint(c.Param("p"), 10, 64)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
logs, err := r.ObtenerRepositorios().Logs.ObtenerPorPaginas(uint(pag))
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
c.JSON(http.StatusOK, logs)
}