Added functionality to user page

This commit is contained in:
2024-04-26 15:45:54 +07:00
parent fd2d4a35fb
commit 769bffe6ff
9 changed files with 186 additions and 64 deletions

View File

@ -1,6 +1,7 @@
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"
@ -15,6 +16,7 @@ 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"
)
@ -35,6 +37,10 @@ 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: