Skip to content
Snippets Groups Projects
Commit 27111115 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Improved delete redirect

parent 72561598
Branches
No related tags found
No related merge requests found
......@@ -56,6 +56,7 @@ func pageImageDetail(ctx PageContext) http.Handler {
panic(err)
}
http.Redirect(w, r, r.URL.Path, http.StatusFound)
fmt.Fprintf(w, "You are being redirected to: %s\n", r.URL.Path)
return
case "delete":
_, err = ctx.Database.Exec("DELETE FROM images WHERE id = $1 AND owner = $2", info.Id, user.Id)
......@@ -69,6 +70,7 @@ func pageImageDetail(ctx PageContext) http.Handler {
}
}
http.Redirect(w, r, "/me/images", http.StatusFound)
fmt.Fprintf(w, "You are being redirected to: %s\n", "/me/images")
return
default:
if err = formatTemplate(w, "image_detail.html", ImageDetailData{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment