Skip to content

Commit a267633

Browse files
committed
Fixed the Patch method to return HTTP code 200 and user object if EnterpriseUser, otherwise HTTP code 204
1 parent ccf5305 commit a267633

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Microsoft.SystemForCrossDomainIdentityManagement/Service/Controllers/ControllerTemplate.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,14 @@ public virtual async Task<IActionResult> Patch(string identifier, [FromBody]Patc
460460

461461
IProviderAdapter<T> provider = this.AdaptProvider();
462462
await provider.Update(request, identifier, patchRequest, correlationIdentifier).ConfigureAwait(false);
463-
return this.Ok();
463+
464+
// If EnterpriseUser, return HTTP code 200 and user object, otherwise HTTP code 204
465+
if (provider.SchemaIdentifier == SchemaIdentifiers.Core2EnterpriseUser)
466+
{
467+
return await Get(identifier).ConfigureAwait(false);
468+
}
469+
else
470+
return this.NoContent();
464471
}
465472
catch (ArgumentException argumentException)
466473
{

0 commit comments

Comments
 (0)