Example #1
0
        public ActionResult <List <ToggleResponseModel> > GetTogglesForServiceId(Guid serviceId)
        {
            if (serviceId == Guid.Empty)
            {
                return(StatusCode(400));
            }

            if (!ValidatorService.ValidateServiceCredentials(serviceId))
            {
                return(StatusCode(401));
            }

            List <ToggleResponseModel> toggleResponseModelList = ToggleServicePermissionService.GetTogglesListForServiceId(serviceId);

            if (toggleResponseModelList == null)
            {
                return(StatusCode(404));
            }

            return(StatusCode(200, toggleResponseModelList));
        }