public async Task <IHttpActionResult> GetAllMissions() { if (User?.Identity?.Name == null) { return(Unauthorized()); } var result = await _service.GetAllMissionsAsync(User.Identity.Name); if (result != null) { return(Ok(result)); } return(BadRequest()); }