feat: implement file renaming
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
fileHandler "github.com/fossyy/filekeeper/handler/file"
|
||||
deleteHandler "github.com/fossyy/filekeeper/handler/file/delete"
|
||||
downloadHandler "github.com/fossyy/filekeeper/handler/file/download"
|
||||
renameFileHandler "github.com/fossyy/filekeeper/handler/file/rename"
|
||||
uploadHandler "github.com/fossyy/filekeeper/handler/file/upload"
|
||||
visibilityHandler "github.com/fossyy/filekeeper/handler/file/visibility"
|
||||
forgotPasswordHandler "github.com/fossyy/filekeeper/handler/forgotPassword"
|
||||
@ -131,6 +132,10 @@ func SetupRoutes() *http.ServeMux {
|
||||
middleware.Auth(visibilityHandler.PUT, w, r)
|
||||
})
|
||||
|
||||
handler.HandleFunc("PATCH /file/{id}", func(w http.ResponseWriter, r *http.Request) {
|
||||
middleware.Auth(renameFileHandler.PATCH, w, r)
|
||||
})
|
||||
|
||||
handler.HandleFunc("GET /logout", func(w http.ResponseWriter, r *http.Request) {
|
||||
middleware.Auth(logoutHandler.GET, w, r)
|
||||
})
|
||||
|
Reference in New Issue
Block a user