Exemplo n.º 1
0
        public async Task <IActionResult> CreateInitiative(InitiativeForCreate initiativeForCreate)
        {
            if (await _initiativeService.InitiativeExistsAsync(initiativeForCreate))
            {
                return(BadRequest("Initiative already exists for year " + initiativeForCreate.Year));
            }

            bool success = await _initiativeService.CreateInitiativeAsync(initiativeForCreate);

            return(Ok(success));
        }