Example #1
0
        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());
        }
Example #2
0
 // add new project to the database
 public IActionResult Post([FromBody] Project project)
 {
     _projectManagementLogic.Add(project);
     return(Ok());
 }