Skip to content

Commit

Permalink
Merge pull request #108 from Nfactor26/map-app-to-viewmodel
Browse files Browse the repository at this point in the history
Map result to ApplicationViewModel while returning result from Create application
  • Loading branch information
Nfactor26 committed Jan 25, 2024
2 parents 8f56046 + d1d1698 commit 3f40060
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 3f40060

Please sign in to comment.