public async Task <IActionResult> GetAirlineData(int airlineId) { if (airlineId < 0) { return(BadRequest(new { Message = "Airline id cannot be negative number." })); } var temp = await service.CheckAdmin(User.Identity.Name, airlineId); if (temp.Success) { var ret = await service.GetData(airlineId); return(Ok(ret)); } else { return(BadRequest(new { Message = temp.Message })); } }