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(c).Logs.ObtenerPorPaginas(uint(pag)) if err != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) return } c.JSON(http.StatusOK, logs) }