rename reservation to availability
This commit is contained in:
		@ -71,13 +71,13 @@ func (m *Repository) MakeReservation(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
	render.RenderTemplate(w, r, "make-reservation.page.tmpl", &models.TemplateData{})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MakeReservation is the make reservation page handler
 | 
			
		||||
func (m *Repository) Reservation(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
	render.RenderTemplate(w, r, "reservation.page.tmpl", &models.TemplateData{})
 | 
			
		||||
// Availability is the search for availability page handler
 | 
			
		||||
func (m *Repository) Availability(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
	render.RenderTemplate(w, r, "availability.page.tmpl", &models.TemplateData{})
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MakeReservation is the make reservation page handler
 | 
			
		||||
func (m *Repository) PostReservation(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
// PostAvailability is the search for availability page handler
 | 
			
		||||
func (m *Repository) PostAvailability(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
	start := r.Form.Get("start")
 | 
			
		||||
	end := r.Form.Get("end")
 | 
			
		||||
	fmt.Fprintf(w, "Posted to search availability from %s to %s", start, end)
 | 
			
		||||
@ -88,8 +88,8 @@ type responseJSON struct {
 | 
			
		||||
	Message string `json:"message"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MakeReservation is the make reservation page handler
 | 
			
		||||
func (m *Repository) ReservationJSON(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
// AvailabilityJSON is the search for availability page handler
 | 
			
		||||
func (m *Repository) AvailabilityJSON(w http.ResponseWriter, r *http.Request) {
 | 
			
		||||
	resp := responseJSON{
 | 
			
		||||
		OK:      "true",
 | 
			
		||||
		Message: "Available!",
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user