runner-go (#102)
Reviewed-on: andr3/fyp#102 Co-authored-by: Andre Henriques <andr3h3nriqu3s@gmail.com> Co-committed-by: Andre Henriques <andr3h3nriqu3s@gmail.com>
This commit was merged in pull request #102.
This commit is contained in:
@@ -241,6 +241,17 @@ func UsersEndpints(db db.Db, handle *Handle) {
|
||||
return c.SendJSON(userReturn)
|
||||
})
|
||||
|
||||
PostAuthJson(handle, "/user/info/get", User_Admin, func(c *Context, dat *JustId) *Error {
|
||||
var user *User
|
||||
user, err := UserFromId(c, dat.Id)
|
||||
if err == NotFoundError {
|
||||
return c.SendJSONStatus(404, "User not found")
|
||||
} else if err != nil {
|
||||
return c.E500M("Could not get user", err)
|
||||
}
|
||||
return c.SendJSON(user)
|
||||
})
|
||||
|
||||
// Handles updating users
|
||||
type UpdateUserData struct {
|
||||
Id string `json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user