Skip to content

Commit

Permalink
Fixed the Patch method to return HTTP code 200 and user object if Ent…
Browse files Browse the repository at this point in the history
…erpriseUser, otherwise HTTP code 204
  • Loading branch information
marcusca10 committed Feb 26, 2020
1 parent ccf5305 commit a267633
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 a267633

Please sign in to comment.