Beispiel #1
0
        public IActionResult Config(string id)
        {
            //If Id is empty then we load the default model
            if (string.IsNullOrEmpty(id))
            {
                //FOR Test
                var ret = ModelExtensions.GetDSSConfig("modelyesno.json");
                return(Ok(ret));
            }

            else
            {
                var model = _context.Find <DSSModel>(int.Parse(id));

                if (model == null)
                {
                    return(NotFound("DSS Model not found"));
                }

                var ret = model.GetConfig();
                return(Ok(ret));
            }
        }