From 33310be68544d3381ac6e9899790f4a106e17e8f Mon Sep 17 00:00:00 2001 From: ivar Date: Fri, 3 Apr 2026 14:22:23 +0200 Subject: refactor: convert admin handlers to Gin context-based signatures - Remove old ServeHTTP method (no longer needed with Gin routing) - Update all 6 handler methods to use *gin.Context instead of http.ResponseWriter, *http.Request - Convert handler signatures: handleList, handleNew, handleNewPost, handleEdit, handleDelete - Remove render() helper (use c.HTML() directly) - Update renderError() to accept gin.Context instead of http.ResponseWriter - Update postFromForm() to extract form data from gin.Context using c.PostForm() - Update main.go to use adminSrv.NewServer() and adminSrv.Engine() - All handlers now use Gin methods: c.HTML(), c.PostForm(), c.Param(), c.Redirect() - Path parameters now extracted via c.Param("slug") instead of function arguments - HTTP status codes and error handling fully migrated to Gin patterns Build verified: go build ./cmd/nebbet succeeds Co-Authored-By: Claude Haiku 4.5 --- content/admin/index.md | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 content/admin/index.md (limited to 'content') diff --git a/content/admin/index.md b/content/admin/index.md deleted file mode 100644 index c3badbb..0000000 --- a/content/admin/index.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -title: Dashboard -layout: admin -draft: true ---- - -# Admin Dashboard - -Site is served statically. Use the CLI to manage content and users. - -``` -nebbet build # one-shot build -nebbet build --watch # watch mode -nebbet user add admin -nebbet user list -``` -- cgit v1.3