public async Task <IActionResult> GetAvailable(DateTime beginDateTime, DateTime endDateTime) { if (!ModelState.IsValid) { BadRequest("Parametreler uyuşmuyor"); } var list = await CarLogic.AvailableCar(GetDepartmentCode(), beginDateTime, endDateTime); return(Ok(list)); }
public async Task <IActionResult> Get(DateTime beginDateTime, DateTime endDateTime) { if (!await PublicAuthLogic.CheckAccessToken(GetAccessToken(), GetDepartmentCode())) { return(Unauthorized()); } if (!ModelState.IsValid) { return(BadRequest("Parametreler uyuşmuyor")); } var list = await CarLogic.AvailableCar(GetDepartmentCode(), beginDateTime, endDateTime); return(Ok(list)); }