public async Task <IActionResult> AddHandler([FromBody] ProjectViewModel projectViewModel) { if (!ModelState.IsValid) { return(BadRequest("ModelState validation failed")); } var user = await GetUser(); await _projectManagementLogic.Add(user, projectViewModel); return(Ok()); }
// add new project to the database public IActionResult Post([FromBody] Project project) { _projectManagementLogic.Add(project); return(Ok()); }