Ejemplo n.º 1
0
        public async Task <ActionResult> ChecklistSelect([FromQuery] UpdateParams uparams)
        {
            if (uparams.Platform == null)
            {
                return(BadRequest("Platform is missing"));
            }
            if (uparams.Site == null)
            {
                return(BadRequest("Site is missing"));
            }
            if (uparams.UpdateNum < 0)
            {
                return(BadRequest("Update number is missing"));
            }
            if (uparams.System == null)
            {
                return(BadRequest("System is missing"));
            }
            if (uparams.Process == null)
            {
                return(BadRequest("Process is missing"));
            }

            var checklist = await _repo.SingleChecklistSelect(uparams);

            if (checklist != null)
            {
                return(Ok(checklist));
            }

            var checklists = await _repo.ChecklistSelect(uparams);

            return(Ok(checklists));
        }