public void TestReorderPlacesNoStartFound() { var places = _service.ReorderPlaces(2); Assert.IsNotEmpty(places); Assert.AreEqual(4, places.Count); }
public ActionResult <IEnumerable <PlaceViewModel> > ReorderPlaces(int id) { var userId = GetUserId(User); if (!_journeyRepository.IsUsersJourney(userId, id)) { return(StatusCode(403, "Journey doesn't belong to the user")); } return(Ok(_journeyService.ReorderPlaces(id))); }