Ejemplo n.º 1
0
        public async Task <IActionResult> Get(string id)
        {
            var schema = await _scimSchemaQueryRepository.FindSCIMSchemaById(id);

            if (schema == null)
            {
                return(this.BuildError(HttpStatusCode.NotFound, $"Schema {id} not found."));
            }

            return(new ContentResult
            {
                StatusCode = (int)HttpStatusCode.OK,
                Content = schema.ToResponse().ToString(),
                ContentType = SCIMConstants.STANDARD_SCIM_CONTENT_TYPE
            });
        }
Ejemplo n.º 2
0
        public async virtual Task <IActionResult> Get(string id)
        {
            var schema = await _scimSchemaQueryRepository.FindSCIMSchemaById(id);

            if (schema == null)
            {
                _logger.LogError(string.Format(Global.SchemaNotFound, id));
                return(this.BuildError(HttpStatusCode.NotFound, string.Format(Global.SchemaNotFound, id)));
            }

            return(new ContentResult
            {
                StatusCode = (int)HttpStatusCode.OK,
                Content = schema.ToResponse().ToString(),
                ContentType = SCIMConstants.STANDARD_SCIM_CONTENT_TYPE
            });
        }