public async Task <IActionResult> Post([FromBody] Tweet tweet) { if (tweet == null) { BadRequest(); } await _tweetService.Add(tweet); return(CreatedAtRoute("Get", new { id = tweet.Id }, tweet)); }
public IActionResult Add(TweetDTO model, string content, IFormFile image) { _tweetService.Add(model, User.Identity.Name, content, image); return(new JsonResult("")); }