Ejemplo n.º 1
0
        public async Task <ActionResult <bool> > TestIfInRange([FromBody] DubbParas parmas)
        {
            bool res = false;

            if (parmas.Dubbtype == "Module")
            {
                res = await _programrepository.CheckIfModuleInRange(parmas.Dubbid, parmas.Dubbstart, parmas.Dubbend);
            }
            else if (parmas.Dubbtype == "Activity")
            {
                res = await _programrepository.CheckIfActivityInRange(parmas.Dubbid, parmas.Dubbstart, parmas.Dubbend);
            }
            else
            {
                return(StatusCode(500, "invalid type")
                       );
            }
            return(Ok(res));
        }