Beispiel #1
0
        public async Task <ActionResult <MissionDto> > Get(string id)
        {
            try
            {
                if (string.IsNullOrEmpty(id))
                {
                    return(BadRequest());
                }
                var mission = await _missionService.Get(id);

                if (mission == null)
                {
                    return(NotFound());
                }
                return(mission);
            }
            catch
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Error"));
            }
        }