public async Task <IActionResult> AddAd(AdvertisementSaveDto ad) { if (ModelState.IsValid) { var currentId = await GetCurrentUserId(); var result = await _advertisementService.AddAdvertisement(currentId, ad); if (result.IsSuccessful) { return(Ok(result.Payload)); } if (result.IsClientError) { return(BadRequest(result.Message)); } return(StatusCode(500)); } return(BadRequest(OtherServices.ReturnAllModelErrors(ModelState))); }