List of users for admin, build script, update dump

This commit is contained in:
Aurélie Delhaie
2022-05-29 23:05:06 +02:00
parent 7a8672ce80
commit 7b4d9ee83f
7 changed files with 106 additions and 7 deletions

View File

@@ -281,3 +281,13 @@ func ChangePassword(w http.ResponseWriter, r *http.Request) {
}
ok(payload, w, r)
}
func AllUsers(w http.ResponseWriter, r *http.Request) {
users, err := database.AllUsers()
if err != nil {
internalServerError(w, r)
log.Println(err)
return
}
ok(users, w, r)
}