Fix file sharing: add backend routes for /orgs/files/{fileId}/share, update frontend ShareFileDialog to use correct paths and improve UI
This commit is contained in:
BIN
go_cloud/api
BIN
go_cloud/api
Binary file not shown.
@@ -221,6 +221,17 @@ func NewRouter(cfg *config.Config, db *database.DB, jwtManager *jwt.Manager, aut
|
||||
revokeUserFileShareLinkHandler(w, req, db)
|
||||
})
|
||||
|
||||
// Share link management for personal files (alternative path for frontend compatibility)
|
||||
r.Get("/orgs/files/{fileId}/share", func(w http.ResponseWriter, req *http.Request) {
|
||||
getUserFileShareLinkHandler(w, req, db)
|
||||
})
|
||||
r.Post("/orgs/files/{fileId}/share", func(w http.ResponseWriter, req *http.Request) {
|
||||
createUserFileShareLinkHandler(w, req, db)
|
||||
})
|
||||
r.Delete("/orgs/files/{fileId}/share", func(w http.ResponseWriter, req *http.Request) {
|
||||
revokeUserFileShareLinkHandler(w, req, db)
|
||||
})
|
||||
|
||||
// Org routes
|
||||
r.Get("/orgs", func(w http.ResponseWriter, req *http.Request) {
|
||||
listOrgsHandler(w, req, db)
|
||||
|
||||
Reference in New Issue
Block a user