Added getUsers func
parent
7ac3c18831
commit
bd9b786e3f
|
@ -274,6 +274,18 @@ func DeleteUser(c *fiber.Ctx) error {
|
||||||
return c.SendStatus(fiber.StatusOK)
|
return c.SendStatus(fiber.StatusOK)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetUsers(c *fiber.Ctx) error {
|
||||||
|
db := database.DB
|
||||||
|
|
||||||
|
log.Info("here")
|
||||||
|
|
||||||
|
users := []structs.APIUser{}
|
||||||
|
|
||||||
|
db.Model(&structs.User{}).Find(&users)
|
||||||
|
|
||||||
|
return c.JSON(users)
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
func GetUsers(c *fiber.Ctx) error {
|
func GetUsers(c *fiber.Ctx) error {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue