Added getUsers func

master
Alex 2021-08-10 12:35:42 +02:00
parent 7ac3c18831
commit bd9b786e3f
1 changed files with 12 additions and 0 deletions

View File

@ -274,6 +274,18 @@ func DeleteUser(c *fiber.Ctx) error {
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 {