CHANGE: added report section
This commit is contained in:
@@ -14,17 +14,22 @@ import (
|
||||
|
||||
// Frontend relevant backend functionality -> not used by the arduino devices
|
||||
func TimeHandler(w http.ResponseWriter, r *http.Request) {
|
||||
helper.RequiresLogin(Session, w, r)
|
||||
helper.SetCors(w)
|
||||
switch r.Method {
|
||||
case "GET":
|
||||
case http.MethodGet:
|
||||
getBookings(w, r)
|
||||
case "POST":
|
||||
break
|
||||
case http.MethodPost:
|
||||
updateBooking(w, r)
|
||||
case "OPTIONS":
|
||||
break
|
||||
case http.MethodOptions:
|
||||
// just support options header for non GET Requests from SWAGGER
|
||||
w.WriteHeader(http.StatusOK)
|
||||
break
|
||||
default:
|
||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
||||
http.Error(w, "Method not allowed!", http.StatusMethodNotAllowed)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user