From a26763316ab1f1a0c3e134b1b6c489824defbdf5 Mon Sep 17 00:00:00 2001 From: Marcus Carvalho Date: Wed, 26 Feb 2020 14:16:59 +0100 Subject: [PATCH] Fixed the Patch method to return HTTP code 200 and user object if EnterpriseUser, otherwise HTTP code 204 --- .../Service/Controllers/ControllerTemplate.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Microsoft.SystemForCrossDomainIdentityManagement/Service/Controllers/ControllerTemplate.cs b/Microsoft.SystemForCrossDomainIdentityManagement/Service/Controllers/ControllerTemplate.cs index 15b460b6..0611e91f 100644 --- a/Microsoft.SystemForCrossDomainIdentityManagement/Service/Controllers/ControllerTemplate.cs +++ b/Microsoft.SystemForCrossDomainIdentityManagement/Service/Controllers/ControllerTemplate.cs @@ -460,7 +460,14 @@ public virtual async Task Patch(string identifier, [FromBody]Patc IProviderAdapter provider = this.AdaptProvider(); await provider.Update(request, identifier, patchRequest, correlationIdentifier).ConfigureAwait(false); - return this.Ok(); + + // If EnterpriseUser, return HTTP code 200 and user object, otherwise HTTP code 204 + if (provider.SchemaIdentifier == SchemaIdentifiers.Core2EnterpriseUser) + { + return await Get(identifier).ConfigureAwait(false); + } + else + return this.NoContent(); } catch (ArgumentException argumentException) {