Skip to content

Commit

Permalink
backend- nickname must not be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Apr 17, 2022
1 parent 8f7d3ee commit 7981632
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/handler/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ func UserUpdate(w http.ResponseWriter, r *http.Request) {
n := c.GetFormString("p_name")
v := r.Form.Get("p_value")
up := ws.UserPerms{}.From(user)
if n != "nickname" {
c.Assert(len(v) > 0, "400: missing form value p_value")
}
c.Assert(len(v) > 0, "400: missing form value p_value")
switch n {
case "nickname":
if user.UUID != u.UUID {
Expand Down

0 comments on commit 7981632

Please sign in to comment.