Sending AJAX post and generalizing the custom function

This commit is contained in:
Muyao CHEN
2024-06-30 16:37:57 +02:00
parent e18849331c
commit eca62e2e7b
3 changed files with 29 additions and 12 deletions

View File

@ -24,7 +24,7 @@ func routes(app *config.AppConfig) http.Handler {
mux.Get("/majors-suite", handlers.Repo.Majors)
mux.Get("/availability", handlers.Repo.Availability)
mux.Post("/availability", handlers.Repo.PostAvailability)
mux.Get("/availability-json", handlers.Repo.AvailabilityJSON)
mux.Post("/availability-json", handlers.Repo.AvailabilityJSON)
mux.Get("/make-reservation", handlers.Repo.MakeReservation)
fileServer := http.FileServer(http.Dir("./static/"))