Lots of changes around viewing tickets from css perspective logic changes nwe handlers and service triggers... just lots of stuff...
This commit is contained in:
7
main.go
7
main.go
@@ -4,10 +4,10 @@ import (
|
||||
"log"
|
||||
"net/http"
|
||||
"synlotto-website/handlers"
|
||||
services "synlotto-website/handlers/admin"
|
||||
"synlotto-website/helpers"
|
||||
"synlotto-website/middleware"
|
||||
"synlotto-website/models"
|
||||
services "synlotto-website/services/admin"
|
||||
"synlotto-website/storage"
|
||||
|
||||
"github.com/gorilla/csrf"
|
||||
@@ -25,6 +25,9 @@ func main() {
|
||||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
// Styling
|
||||
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
|
||||
|
||||
mux.HandleFunc("/", handlers.Home(db))
|
||||
mux.HandleFunc("/new", handlers.NewDraw) // ToDo: needs to be wrapped in admin auth
|
||||
mux.HandleFunc("/submit", handlers.Submit)
|
||||
@@ -40,7 +43,7 @@ func main() {
|
||||
mux.HandleFunc("/account/tickets/my_tickets", handlers.GetMyTickets(db))
|
||||
|
||||
// Admin Pages
|
||||
mux.HandleFunc("/admin/match", services.AdminMatchHandler)
|
||||
mux.HandleFunc("/admin/triggers", services.AdminTriggersHandler(db))
|
||||
|
||||
log.Println("🌐 Running on http://localhost:8080")
|
||||
http.ListenAndServe(":8080", helpers.RateLimit(csrfMiddleware(mux)))
|
||||
|
||||
Reference in New Issue
Block a user