func handleGetFavorites(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
	token, err := servers.AuthenticateWithHeader(r.Header.Get("Authorization"), strings.Split(r.RemoteAddr, ":")[0])
	if err != servers.STATUS_ERR_OK {
		servers.WriteResponse(w, nil, err)
		return
	}

	favorites, queryerr := models.LoadFavoritesFromDB(token.UsersId)
	if queryerr != nil {
		servers.WriteResponse(w, nil, servers.STATUS_ERR_QUERY_PROBLEM)
		return
	}

	error := favorites.LoadDishesFromDB()
	if error != nil {
		servers.WriteResponse(w, nil, servers.STATUS_ERR_QUERY_PROBLEM)
		return
	}

	usersDishes, queryerr2 := models.GetUsersDishes(token.UsersId, favorites.Dishes)
	if queryerr2 != nil {
		servers.WriteResponse(w, nil, servers.STATUS_ERR_QUERY_PROBLEM)
		return
	}

	servers.WriteResponse(w, usersDishes, servers.STATUS_SUCCESS)
}
func handleRemoveFavorites(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
	token, err := servers.AuthenticateWithHeader(r.Header.Get("Authorization"), strings.Split(r.RemoteAddr, ":")[0])
	if err != servers.STATUS_ERR_OK {
		servers.WriteResponse(w, nil, err)
		return
	}

	idStr := ps.ByName("dishId")

	dishId, convErr := strconv.ParseUint(idStr, 10, 64)
	if convErr != nil {
		servers.WriteResponse(w, nil, servers.STATUS_ERR_PARAMS_DECODE)
		return
	}

	favorites, queryerr := models.LoadFavoritesFromDB(token.UsersId)
	if queryerr != nil {
		servers.WriteResponse(w, nil, servers.STATUS_ERR_QUERY_PROBLEM)
		return
	}

	favorites.RemoveDish(dishId)
	queryerr = favorites.LoadDishesFromDB()
	if queryerr != nil {
		servers.WriteResponse(w, nil, servers.STATUS_ERR_QUERY_PROBLEM)
		return
	}

	queryerr = favorites.SaveToDB()
	if queryerr != nil {
		servers.WriteResponse(w, nil, servers.STATUS_ERR_QUERY_PROBLEM)
		return
	}

	usersDishes, queryerr2 := models.GetUsersDishes(token.UsersId, favorites.Dishes)
	if queryerr2 != nil {
		servers.WriteResponse(w, nil, servers.STATUS_ERR_QUERY_PROBLEM)
		return
	}

	servers.WriteResponse(w, usersDishes, servers.STATUS_SUCCESS)
}