Exemple #1
0
        public async Task <IActionResult> UnassignFavourite(int userId, int locatableId)
        {
            var result = await _favouriteService.UnassignFavouriteAsync(userId, locatableId);

            if (!result.Success)
            {
                return(BadRequest(result.Message));
            }
            var locatableResource = _mapper.Map <Locatable, LocatableResource>(result.Resource.Locatable);

            return(Ok(locatableResource));
        }