func CancelReservationByTeacher(w http.ResponseWriter, r *http.Request, userId string, userType models.UserType) interface{} { r.ParseForm() reservationIds := []string(r.Form["reservation_ids"]) var result = map[string]interface{}{"state": "SUCCESS"} var tl = buslogic.TeacherLogic{} removed, err := tl.CancelReservationsByTeacher(reservationIds, userId, userType) if err != nil { ErrorHandler(w, r, err) return nil } result["removed_count"] = removed return result }