Creating a handler that return JSON

This commit is contained in:
Muyao CHEN
2024-06-30 10:42:57 +02:00
parent 76bee566cd
commit a8b56b50db
2 changed files with 25 additions and 0 deletions

View File

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