Changeset 0.19.0.1 (#82)

This commit is contained in:
2026-02-28 23:46:23 +00:00
parent 091ce2af6a
commit 748f49bedd
30 changed files with 3873 additions and 151 deletions

View File

@@ -332,6 +332,24 @@ func main() {
protected.DELETE("/notes/:id", notes.Delete)
protected.GET("/notes/:id/backlinks", notes.Backlinks)
// Projects (v0.19.0)
projectH := handlers.NewProjectHandler(stores)
protected.GET("/projects", projectH.List)
protected.POST("/projects", projectH.Create)
protected.GET("/projects/:id", projectH.Get)
protected.PUT("/projects/:id", projectH.Update)
protected.DELETE("/projects/:id", projectH.Delete)
protected.POST("/projects/:id/channels", projectH.AddChannel)
protected.DELETE("/projects/:id/channels/:channelId", projectH.RemoveChannel)
protected.GET("/projects/:id/channels", projectH.ListChannels)
protected.PUT("/projects/:id/channels/reorder", projectH.ReorderChannels)
protected.POST("/projects/:id/knowledge-bases", projectH.AddKB)
protected.DELETE("/projects/:id/knowledge-bases/:kbId", projectH.RemoveKB)
protected.GET("/projects/:id/knowledge-bases", projectH.ListKBs)
protected.POST("/projects/:id/notes", projectH.AddNote)
protected.DELETE("/projects/:id/notes/:noteId", projectH.RemoveNote)
protected.GET("/projects/:id/notes", projectH.ListNotes)
// Attachments (file upload/download)
attachH := handlers.NewAttachmentHandler(stores, objStore, extQueue)
protected.POST("/channels/:id/attachments", attachH.Upload)
@@ -515,6 +533,11 @@ func main() {
// Resource Grants (admin — v0.16.0)
admin.GET("/grants/:type/:id", groupAdm.GetResourceGrant)
admin.PUT("/grants/:type/:id", groupAdm.SetResourceGrant)
// Projects (admin — v0.19.0)
adminProjH := handlers.NewProjectHandler(stores)
admin.GET("/projects", adminProjH.AdminList)
admin.DELETE("/projects/:id", adminProjH.Delete)
admin.DELETE("/grants/:type/:id", groupAdm.DeleteResourceGrant)
// Model Roles