Skip to content

Commit 78ceab5

Browse files
committed
Auto-gen README
1 parent 0a011ed commit 78ceab5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,14 @@ func (u *Users) PutUser(w rest.ResponseWriter, r *rest.Request) {
351351
u.Lock()
352352
if u.Store[id] == nil {
353353
rest.NotFound(w, r)
354+
u.Unlock()
354355
return
355356
}
356357
user := User{}
357358
err := r.DecodeJsonPayload(&user)
358359
if err != nil {
359360
rest.Error(w, err.Error(), http.StatusInternalServerError)
361+
u.Unlock()
360362
return
361363
}
362364
user.Id = id

0 commit comments

Comments
 (0)