add root route: redirect / → /admin (default surface)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-frontend (push) Has been skipped
CI/CD / test-go-pg (push) Successful in 2m18s
CI/CD / test-sqlite (push) Successful in 2m31s
CI/CD / build-and-deploy (push) Successful in 1m9s

The chat surface (which owned /) was gutted, leaving no root route.
Now / redirects to /admin as the default surface. Configurable
default surface planned for v0.2.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 13:35:58 +00:00
parent 10cfd147fe
commit 9eb56ca7de

View File

@@ -679,6 +679,11 @@ func main() {
pages.SetVersion(Version) pages.SetVersion(Version)
pageEngine := pages.New(cfg, stores) pageEngine := pages.New(cfg, stores)
// Root redirect → default surface (admin for now, configurable in v0.2.0)
base.GET("/", func(c *gin.Context) {
c.Redirect(http.StatusTemporaryRedirect, cfg.BasePath+"/admin")
})
// Login page — no auth required // Login page — no auth required
base.GET("/login", pageEngine.RenderLogin()) base.GET("/login", pageEngine.RenderLogin())