public async Task <IActionResult> CreateAd(Guid memberId, [FromBody] AdForCreationDto adForCreation) { if (!User.CheckAuthorization(memberId)) { return(BadRequest(new UnauthorizedErrorResult())); } IResult result = await _adService.CreateAsync(adForCreation); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }