feat: add file visibility toggle for files
This commit is contained in:
@ -8,6 +8,7 @@ import (
|
||||
fileHandler "github.com/fossyy/filekeeper/handler/file"
|
||||
downloadHandler "github.com/fossyy/filekeeper/handler/file/download"
|
||||
uploadHandler "github.com/fossyy/filekeeper/handler/file/upload"
|
||||
visibilityHandler "github.com/fossyy/filekeeper/handler/file/visibility"
|
||||
forgotPasswordHandler "github.com/fossyy/filekeeper/handler/forgotPassword"
|
||||
forgotPasswordVerifyHandler "github.com/fossyy/filekeeper/handler/forgotPassword/verify"
|
||||
indexHandler "github.com/fossyy/filekeeper/handler/index"
|
||||
@ -121,6 +122,10 @@ func SetupRoutes() *http.ServeMux {
|
||||
downloadHandler.GET(w, r)
|
||||
})
|
||||
|
||||
handler.HandleFunc("PUT /file/{id}", func(w http.ResponseWriter, r *http.Request) {
|
||||
middleware.Auth(visibilityHandler.PUT, 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