Massive refactor!
This commit is contained in:
@@ -4,14 +4,16 @@ import (
|
||||
"database/sql"
|
||||
"net/http"
|
||||
|
||||
account "synlotto-website/handlers/account"
|
||||
|
||||
"synlotto-website/handlers"
|
||||
"synlotto-website/middleware"
|
||||
)
|
||||
|
||||
func SetupAccountRoutes(mux *http.ServeMux, db *sql.DB) {
|
||||
mux.HandleFunc("/login", middleware.Protected(handlers.Login))
|
||||
mux.HandleFunc("/logout", handlers.Logout)
|
||||
mux.HandleFunc("/signup", middleware.Protected(handlers.Signup))
|
||||
mux.HandleFunc("/login", middleware.Protected(account.Login))
|
||||
mux.HandleFunc("/logout", account.Logout)
|
||||
mux.HandleFunc("/signup", middleware.Protected(account.Signup))
|
||||
mux.HandleFunc("/account/tickets/add_ticket", handlers.AddTicket(db))
|
||||
mux.HandleFunc("/account/tickets/my_tickets", handlers.GetMyTickets(db))
|
||||
mux.HandleFunc("/account/messages", middleware.Protected(handlers.MessagesInboxHandler(db)))
|
||||
|
||||
Reference in New Issue
Block a user