From c9de5b9e1856115317346cf3080c6254cad7b9b3 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Mon, 6 Feb 2023 02:04:13 +0400 Subject: [PATCH] Oh, I don't need to create new entries in an admin panel. --- cmd/dwelling-home/main.go | 1 - internal/http/handlers.go | 3 --- 2 files changed, 4 deletions(-) diff --git a/cmd/dwelling-home/main.go b/cmd/dwelling-home/main.go index 79ce788..1a0ca9d 100644 --- a/cmd/dwelling-home/main.go +++ b/cmd/dwelling-home/main.go @@ -68,7 +68,6 @@ func main() { srv.GET("/guestbook/admin", hand.GuestbookAdmin) srv.DELETE("/guestbook/admin/entry/:id", hand.GuestbookAdminDeleteEntry) srv.POST("/guestbook/admin/entry/:id", hand.GuestbookAdminUpdateEntry) - srv.POST("/guestbook/admin/entry/", hand.GuestbookAdminNewEntry) srv.DELETE("/guestbook/admin/reply/:id", hand.GuestbookAdminDeleteReply) srv.POST("/guestbook/admin/reply/:id", hand.GuestbookAdminUpdateReply) srv.POST("/guestbook/admin/reply/", hand.GuestbookAdminNewReply) diff --git a/internal/http/handlers.go b/internal/http/handlers.go index 6957123..1d1600f 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -187,9 +187,6 @@ func (h *Handlers) GuestbookAdminDeleteEntry(w http.ResponseWriter, r *http.Requ func (h *Handlers) GuestbookAdminUpdateEntry(w http.ResponseWriter, r *http.Request) { } -func (h *Handlers) GuestbookAdminNewEntry(w http.ResponseWriter, r *http.Request) { -} - func (h *Handlers) GuestbookAdminDeleteReply(w http.ResponseWriter, r *http.Request) { id, err := strconv.ParseInt(GetURLParam(r, "id"), 10, 64) if err != nil {