migrate to WebSocket for frontend and backend communication

This commit is contained in:
2024-09-09 21:38:10 +07:00
parent b46915e46d
commit b23bf8898b
16 changed files with 309 additions and 202 deletions

View File

@ -15,7 +15,6 @@ import (
signupHandler "github.com/fossyy/filekeeper/handler/signup"
signupVerifyHandler "github.com/fossyy/filekeeper/handler/signup/verify"
uploadHandler "github.com/fossyy/filekeeper/handler/upload"
"github.com/fossyy/filekeeper/handler/upload/initialisation"
userHandler "github.com/fossyy/filekeeper/handler/user"
userHandlerResetPassword "github.com/fossyy/filekeeper/handler/user/ResetPassword"
userSessionTerminateHandler "github.com/fossyy/filekeeper/handler/user/session/terminate"
@ -118,10 +117,6 @@ func SetupRoutes() *http.ServeMux {
middleware.Auth(uploadHandler.POST, w, r)
})
handler.HandleFunc("POST /upload/init", func(w http.ResponseWriter, r *http.Request) {
middleware.Auth(initialisation.POST, w, r)
})
handler.HandleFunc("GET /download", func(w http.ResponseWriter, r *http.Request) {
middleware.Auth(downloadHandler.GET, w, r)
})