Setup wallet and transaction retrieval, better swagger docs, and proper dtos

This commit is contained in:
2023-08-19 16:43:58 -04:00
parent 658bd7ca2a
commit dc9ab74598
16 changed files with 224 additions and 21 deletions

View File

@ -103,6 +103,10 @@ namespace IO.Swagger.Controllers
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
[ValidateModelState]
[SwaggerOperation("CreateCurrency")]
[ProducesResponseType(201)]
[ProducesResponseType(typeof(IEnumerable<string>), 400)]
[ProducesResponseType(401)]
[ProducesResponseType(422)]
public virtual async Task<IActionResult> CreateCurrency([FromBody]CurrencyCreateBody body)
{
var userIdString = HttpContext.User.Claims.First(c => c.Type == ClaimTypes.NameIdentifier).Value;
@ -129,6 +133,10 @@ namespace IO.Swagger.Controllers
[Authorize(AuthenticationSchemes = BearerAuthenticationHandler.SchemeName)]
[ValidateModelState]
[SwaggerOperation("MintCurrency")]
[ProducesResponseType(200)]
[ProducesResponseType(typeof(IEnumerable<string>), 400)]
[ProducesResponseType(401)]
[ProducesResponseType(409)]
public virtual async Task<IActionResult> MintCurrency([FromBody]CurrencyMintBody body)
{
var userIdString = HttpContext.User.Claims.First(c => c.Type == ClaimTypes.NameIdentifier).Value;