summaryrefslogtreecommitdiffstats
path: root/internal/server
diff options
context:
space:
mode:
authorivar <i@oiee.no>2026-04-23 22:54:31 +0200
committerivar <i@oiee.no>2026-04-23 22:54:31 +0200
commit4817e77682fb05288496a6e2db6b1e1c9260aba9 (patch)
treee001e1d1ef15cc2e7f3380992f150112686dcf53 /internal/server
parent7f40b470a7d42a7674cc74309b210a968291ca23 (diff)
downloadiblog-master.tar.xz
iblog-master.zip
Redirect back to post on create/editHEADmaster
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/adminserver.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/server/adminserver.go b/internal/server/adminserver.go
index 6b46bf3..d519ab4 100644
--- a/internal/server/adminserver.go
+++ b/internal/server/adminserver.go
@@ -292,7 +292,7 @@ func (s *Server) handleNewPost(c *gin.Context) {
Content: plainText,
})
- c.Redirect(http.StatusSeeOther, "/admin/")
+ c.Redirect(http.StatusSeeOther, "/admin/"+record.Slug)
}
func (s *Server) handleEdit(c *gin.Context) {
@@ -378,7 +378,7 @@ func (s *Server) handleEdit(c *gin.Context) {
Content: plainText,
})
- c.Redirect(http.StatusSeeOther, "/admin/")
+ c.Redirect(http.StatusSeeOther, "/admin/"+record.Slug)
return
}