public async Task <IActionResult> CreateAsync([FromBody] Advert advert) { var currentUserId = HttpContext.GetUserId(); advert.AuthorId = currentUserId; await _advertRepository.CreateAsync(advert); return(Ok()); }