コード例 #1
0
        public async Task <IActionResult> GetAdvertisementByEnvironmentAsync([FromBody] GetAdvertisementByEnvironmentRequest request)
        {
            int  localTimeInMinutes = GetUserLocalTimeInMinutes((int)request.TimeZoneOffset);
            Guid currentUserId      = Guid.Parse(User.Identity.Name);

            var response = await _advertisementService.GetAdvertisementByEnvironmentAsync(
                localTimeInMinutes, request, currentUserId);

            if (response == null)
            {
                return(NoContent());
            }
            return(Ok(response));
        }