コード例 #1
0
        public void TestReorderPlacesNoStartFound()
        {
            var places = _service.ReorderPlaces(2);

            Assert.IsNotEmpty(places);
            Assert.AreEqual(4, places.Count);
        }
コード例 #2
0
        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)));
        }