Skip to content

Commit

Permalink
add missing return after http.Error (#131)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Scott <paul@tailscale.com>
  • Loading branch information
icio committed Jun 6, 2024
1 parent ef8d461 commit 2ca2d9d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions golink.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,7 @@ func serveSave(w http.ResponseWriter, r *http.Request) {
link, err := db.Load(short)
if err != nil && !errors.Is(err, fs.ErrNotExist) {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}

if !canEditLink(r.Context(), link, cu) {
Expand Down

0 comments on commit 2ca2d9d

Please sign in to comment.