Add skeleton loading state for file load

This commit is contained in:
2024-09-23 21:40:01 +07:00
parent 59d4154ef0
commit 757dde58c0
17 changed files with 309 additions and 259 deletions

View File

@ -12,6 +12,7 @@ import (
downloadHandler "github.com/fossyy/filekeeper/handler/file/download"
queryHandler "github.com/fossyy/filekeeper/handler/file/query"
renameFileHandler "github.com/fossyy/filekeeper/handler/file/rename"
fileTableHandler "github.com/fossyy/filekeeper/handler/file/table"
uploadHandler "github.com/fossyy/filekeeper/handler/file/upload"
visibilityHandler "github.com/fossyy/filekeeper/handler/file/visibility"
forgotPasswordHandler "github.com/fossyy/filekeeper/handler/forgotPassword"
@ -119,6 +120,10 @@ func SetupRoutes() *http.ServeMux {
middleware.Auth(fileHandler.GET, w, r)
})
handler.HandleFunc("GET /file/table", func(w http.ResponseWriter, r *http.Request) {
middleware.Auth(fileTableHandler.GET, w, r)
})
handler.HandleFunc("GET /file/query", func(w http.ResponseWriter, r *http.Request) {
middleware.Auth(queryHandler.GET, w, r)
})