Private
Public Access
18 lines
346 B
Go
18 lines
346 B
Go
package grupo
|
|
|
|
import (
|
|
"net/http"
|
|
r "repuestera_back/repositorios"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func ObtenerGrupos(c *gin.Context) {
|
|
grupos, err := r.ObtenerRepositorios(c).Grupo.ObtenerTodosConRelaciones()
|
|
if err != nil {
|
|
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
|
return
|
|
}
|
|
c.JSON(http.StatusOK, grupos)
|
|
}
|