implemented the /go shortcut processing

This commit is contained in:
2026-01-22 22:46:15 -07:00
parent 9218025450
commit c3e31e295c
3 changed files with 123 additions and 4 deletions
+4 -2
View File
@@ -50,7 +50,7 @@ func setupEcho() *echo.Echo {
e.POST("/TODO/*", fn)
e.GET("/img/*", ui.AmServeImage)
e.GET("/static/*", ui.AmStaticFileHandler())
e.GET("/go/:postlink", fn)
e.GET("/go/:postlink", ui.AmWrap(JumpToShortcut))
e.GET("/", ui.AmWrap(TopPage))
e.GET("/about", ui.AmWrap(AboutPage))
@@ -79,7 +79,9 @@ func setupEcho() *echo.Echo {
// community group
commGroup := e.Group("/comm/:cid", ui.SetCommunity)
commGroup.GET("/profile", ui.AmWrap(ShowCommunity))
fn1 := ui.AmWrap(ShowCommunity)
commGroup.GET("", fn1)
commGroup.GET("/profile", fn1)
commGroup.GET("/join", ui.AmWrap(JoinCommunity))
commGroup.POST("/join", ui.AmWrap(JoinCommunityWithKey))
commGroup.GET("/unjoin", ui.AmWrap(UnjoinCommunity))