Changeset 0.37.17 (#229)
Co-authored-by: gobha <jasafpro@gmail.com> Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
@@ -888,14 +888,18 @@ func main() {
|
||||
protected.DELETE("/projects/:id/notes/:noteId", projectH.RemoveNote)
|
||||
protected.GET("/projects/:id/notes", projectH.ListNotes)
|
||||
|
||||
// Project files (v0.22.4) — wired via fileH which is declared later,
|
||||
// so we use a closure that captures the variable.
|
||||
protected.POST("/projects/:id/files", func(c *gin.Context) {
|
||||
handlers.NewFileHandler(stores, objStore, extQueue).UploadToProject(c)
|
||||
})
|
||||
protected.GET("/projects/:id/files", func(c *gin.Context) {
|
||||
handlers.NewFileHandler(stores, objStore, extQueue).ListByProject(c)
|
||||
})
|
||||
// Project files (v0.22.4, reworked v0.37.17 — workspace-backed)
|
||||
projFileH := handlers.NewFileHandler(stores, objStore, extQueue)
|
||||
if wfs != nil {
|
||||
projFileH.SetWorkspaceFS(wfs)
|
||||
}
|
||||
protected.POST("/projects/:id/files", projFileH.UploadToProject)
|
||||
protected.GET("/projects/:id/files", projFileH.ListByProject)
|
||||
protected.GET("/projects/:id/files/download", projFileH.DownloadProjectFile)
|
||||
protected.DELETE("/projects/:id/files", projFileH.DeleteProjectFile)
|
||||
protected.POST("/projects/:id/files/mkdir", projFileH.MkdirProject)
|
||||
protected.POST("/projects/:id/archive/upload", projFileH.UploadProjectArchive)
|
||||
protected.GET("/projects/:id/archive/download", projFileH.DownloadProjectArchive)
|
||||
|
||||
// Notifications (v0.20.0)
|
||||
notifH := handlers.NewNotificationHandler(stores, hub)
|
||||
|
||||
Reference in New Issue
Block a user