Пример #1
0
        public async Task CreateMissionFromApi([FromBody] MissionModel model)
        {
            try
            {
                var mission = model.ToMission();
                await this.MissionsManager.CreateMissionAsync(mission);

                await this.UserNotify.SendNotif(this.User.Identity.Name, "La mission a bien été crée");
            }
            catch (BusinessException ex)
            {
                await this.UserNotify.SendErrorNotif(this.User.Identity.Name, ex.Message);
            }
            //return missions.Select(mission => mission.ToMissionModel()).ToArray();
        }