Пример #1
0
        public async Task <IActionResult> AddSpotToRegionAsync(int id, [FromBody] Spot spotModel)
        {
            try
            {
                spotModel.RegionId = id;
                var spot = await service.AddSpotToRegionAsync(spotModel);

                return(Ok(spot));
            }
            catch (Exception ex)
            {
                var exceptionResponse = GetExceptionResponse(ex, Request);
                return(exceptionResponse);
            }
        }