public async Task <IActionResult> Post([FromForm] DocumentInput upload) { if (!ModelState.IsValid) { return(BadRequest()); } var result = await _documentRepository.Create(upload); return(Ok(result)); }
public HttpResponseMessage Create([ModelBinder] Session session) { var document = documentsRepository.Create(session.UserId); return(new RedirectResult($"/Editor/{document.Id}")); }