From 4bd5248cdd7c63ba49dd169ac8acc560e5b6ed02 Mon Sep 17 00:00:00 2001 From: yequari Date: Sat, 3 Jan 2026 13:19:35 -0700 Subject: [PATCH] remove all guestbooks view --- cmd/web/routes.go | 2 +- ui/views/common.templ | 1 - ui/views/common_templ.go | 14 +++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/cmd/web/routes.go b/cmd/web/routes.go index 932e778..31b8d0f 100644 --- a/cmd/web/routes.go +++ b/cmd/web/routes.go @@ -43,7 +43,6 @@ func (app *application) routes() http.Handler { mux.Handle("POST /users/logout", protected.ThenFunc(app.postUserLogout)) mux.Handle("GET /users/settings", protected.ThenFunc(app.getUserSettings)) mux.Handle("PUT /users/settings", protected.ThenFunc(app.putUserSettings)) - mux.Handle("GET /guestbooks", protected.ThenFunc(app.getAllGuestbooks)) mux.Handle("GET /websites", protected.ThenFunc(app.getWebsiteList)) mux.Handle("GET /websites/create", protected.ThenFunc(app.getWebsiteCreate)) mux.Handle("POST /websites/create", protected.ThenFunc(app.postWebsiteCreate)) @@ -59,6 +58,7 @@ func (app *application) routes() http.Handler { mux.Handle("GET /websites/{id}/dashboard/guestbook/customize", protected.ThenFunc(app.getComingSoon)) adminOnly := protected.Append(app.requireAdmin) + mux.Handle("GET /guestbooks", adminOnly.ThenFunc(app.getAllGuestbooks)) mux.Handle("GET /admin", adminOnly.ThenFunc(app.getAdminPanelLanding)) mux.Handle("GET /admin/users", adminOnly.ThenFunc(app.getAdminPanelAllUsers)) mux.Handle("GET /admin/users/{id}", adminOnly.ThenFunc(app.getAdminPanelUser)) diff --git a/ui/views/common.templ b/ui/views/common.templ index c0463fb..5eccfac 100644 --- a/ui/views/common.templ +++ b/ui/views/common.templ @@ -65,7 +65,6 @@ templ topNav(data CommonData) {