Get user after edit
This commit is contained in:
parent
73a91be228
commit
189719ec02
|
|
@ -57,14 +57,6 @@ func UserPost(app *lishwist.Session, h http.Header, r *http.Request) rsvp.Respon
|
|||
return response.Error(http.StatusForbidden, "You cannot delete yourself.")
|
||||
}
|
||||
|
||||
user, err := lishwist.GetUserByReference(reference)
|
||||
if err != nil {
|
||||
return response.Error(http.StatusInternalServerError, "Failed to get user: %s", err)
|
||||
}
|
||||
if user == nil {
|
||||
return response.Error(http.StatusNotFound, "User not found")
|
||||
}
|
||||
|
||||
intent := r.Form.Get("intent")
|
||||
|
||||
switch intent {
|
||||
|
|
@ -81,5 +73,10 @@ func UserPost(app *lishwist.Session, h http.Header, r *http.Request) rsvp.Respon
|
|||
}
|
||||
}
|
||||
|
||||
user, err := lishwist.GetUserByReference(reference)
|
||||
if err != nil {
|
||||
return response.Error(http.StatusInternalServerError, "Failed to get user: %s", err)
|
||||
}
|
||||
|
||||
return response.Data("", user)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue