Skip to content

Commit

Permalink
Map result to ApplicationViewModel while returning result from Create…
Browse files Browse the repository at this point in the history
… application

Result of IOpenIddictApplicationManager->CreateAsync fails to deserialize if JsonWebKeySet has a value. We need to map it to ApplicationViewModel for mapping correctly just like in Get calls.
  • Loading branch information
Nfactor26 committed Jan 25, 2024
1 parent 8f56046 commit d1d1698
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public async Task<IActionResult> Create([FromBody] ApplicationViewModel applicat
{
await AllowOriginsAsync(applicationDescriptor.RedirectUris);
}
return CreatedAtAction(nameof(Get), new { clientId = applicationDescriptor.ClientId }, result);
return CreatedAtAction(nameof(Get), new { clientId = applicationDescriptor.ClientId }, mapper.Map<ApplicationViewModel>(result));
}
return BadRequest(new BadRequestResponse(ModelState.GetValidationErrors()));
}
Expand Down

0 comments on commit d1d1698

Please sign in to comment.