Example #1
0
        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));
        }
Example #2
0
        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));
        }