Refactor session package for better structure and naming conventions

This commit is contained in:
2024-04-26 20:33:34 +07:00
parent 769bffe6ff
commit c43fd0232e
11 changed files with 52 additions and 161 deletions

View File

@ -1,7 +1,6 @@
package routes
import (
"encoding/json"
downloadHandler "github.com/fossyy/filekeeper/handler/download"
downloadFileHandler "github.com/fossyy/filekeeper/handler/download/file"
forgotPasswordHandler "github.com/fossyy/filekeeper/handler/forgotPassword"
@ -16,7 +15,6 @@ import (
"github.com/fossyy/filekeeper/handler/upload/initialisation"
userHandler "github.com/fossyy/filekeeper/handler/user"
"github.com/fossyy/filekeeper/middleware"
"github.com/fossyy/filekeeper/session"
"net/http"
)
@ -37,10 +35,6 @@ func SetupRoutes() *http.ServeMux {
}
})
handler.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(session.Getses())
})
handler.HandleFunc("/signin", func(w http.ResponseWriter, r *http.Request) {
switch r.Method {
case http.MethodGet: