fix: need to add options routes

This commit is contained in:
Derrick Hammer 2024-02-03 19:34:55 -05:00
parent fd721077e5
commit d57a14d9a3
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 4 deletions

View File

@ -116,10 +116,12 @@ func getRoutes(s *S5API) map[string]jape.Handler {
"POST /s5/upload/directory": middleware.ApplyMiddlewares(s.httpHandler.DirectoryUpload, middleware.AuthMiddleware(s.identity, s.accounts)),
// Tus API
"POST /s5/upload/tus": tusHandler,
"HEAD /s5/upload/tus/:id": tusHandler,
"POST /s5/upload/tus/:id": tusHandler,
"PATCH /s5/upload/tus/:id": tusHandler,
"POST /s5/upload/tus": tusHandler,
"OPTIONS /s5/upload/tus": tusHandler,
"HEAD /s5/upload/tus/:id": tusHandler,
"POST /s5/upload/tus/:id": tusHandler,
"PATCH /s5/upload/tus/:id": tusHandler,
"OPTIONS /s5/upload/tus/:id": tusHandler,
// Download API
"GET /s5/blob/:cid": middleware.ApplyMiddlewares(s.httpHandler.DownloadBlob, middleware.AuthMiddleware(s.identity, s.accounts)),