Skip to content

Commit

Permalink
Merge pull request #8 from AzureAD/fix-patch-response
Browse files Browse the repository at this point in the history
Fixed the Patch method HTTP return code
  • Loading branch information
marcusca10 authored Feb 26, 2020
2 parents ccf5305 + a267633 commit 6402036
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,14 @@ public virtual async Task<IActionResult> Patch(string identifier, [FromBody]Patc

IProviderAdapter<T> 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)
{
Expand Down

0 comments on commit 6402036

Please sign in to comment.