Compare commits
No commits in common. "4783ee7fe9d72f5b3dabdcecfd87587dc790c437" and "24697f40dd427e48d05a1c32c75c75781ba70d41" have entirely different histories.
4783ee7fe9
...
24697f40dd
|
|
@ -57,6 +57,14 @@ func UserPost(app *lishwist.Session, h http.Header, r *http.Request) rsvp.Respon
|
||||||
return response.Error(http.StatusForbidden, "You cannot delete yourself.")
|
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")
|
intent := r.Form.Get("intent")
|
||||||
|
|
||||||
switch intent {
|
switch intent {
|
||||||
|
|
@ -73,10 +81,5 @@ 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)
|
return response.Data("", user)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue