backend: expand bookmark API with bulk ops and metadata fetcher
- bulk create/delete/move, reorder, rename-category endpoints - /bookmarks/meta with SSRF-safe fetcher (blocks private/loopback IPs, 8s timeout, 1 MiB body cap) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -41,6 +41,12 @@ func Setup(cfg *config.Config) *gin.Engine {
|
||||
{
|
||||
auth.GET("/bookmarks", bookmarkHandler.List)
|
||||
auth.POST("/bookmarks", bookmarkHandler.Create)
|
||||
auth.POST("/bookmarks/meta", bookmarkHandler.FetchMeta)
|
||||
auth.POST("/bookmarks/bulk", bookmarkHandler.BulkCreate)
|
||||
auth.POST("/bookmarks/bulk-delete", bookmarkHandler.BulkDelete)
|
||||
auth.POST("/bookmarks/bulk-move", bookmarkHandler.BulkMove)
|
||||
auth.POST("/bookmarks/reorder", bookmarkHandler.Reorder)
|
||||
auth.POST("/bookmarks/rename-category", bookmarkHandler.RenameCategory)
|
||||
auth.PUT("/bookmarks/:id", bookmarkHandler.Update)
|
||||
auth.DELETE("/bookmarks/:id", bookmarkHandler.Delete)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user