package repuestos import ( "net/http" "github.com/gin-gonic/gin" r "repuestera_back/repositorios" ) func ObtenerRepuestos(c *gin.Context) { repuestos, err := r.ObtenerRepositorios().Repuesto.ObtenerTodos() if err != nil { c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()}) return } c.JSON(http.StatusOK, repuestos) }