Skip to content

Commit

Permalink
Seperate battle, refresh ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
Atralupus committed Jan 21, 2025
1 parent 819f129 commit 4bd34fc
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 44 deletions.
86 changes: 43 additions & 43 deletions ArenaService/Controllers/TicketController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,78 +12,78 @@ namespace ArenaService.Controllers;
[ApiController]
public class TicketController : ControllerBase
{
public TicketController() { }

public TicketController(
)
[HttpGet("battle")]
[Authorize(Roles = "User", AuthenticationSchemes = "ES256K")]
[SwaggerOperation(Summary = "", Description = "")]
[SwaggerResponse(StatusCodes.Status200OK, "TicketStatus", typeof(TicketStatusResponse))]
[SwaggerResponse(StatusCodes.Status401Unauthorized, "")]
[SwaggerResponse(StatusCodes.Status503ServiceUnavailable, "")]
public async Task<Results<NotFound<string>, StatusCodeHttpResult, Ok>> GetBattleTicketStatus()
{
return TypedResults.Ok();
}

[HttpGet("refresh")]
[Authorize(Roles = "User", AuthenticationSchemes = "ES256K")]
[SwaggerOperation(Summary = "", Description = "")]
[SwaggerResponse(StatusCodes.Status200OK, "TicketStatus", typeof(TicketStatusResponse))]
[SwaggerResponse(StatusCodes.Status401Unauthorized, "")]
[SwaggerResponse(StatusCodes.Status503ServiceUnavailable, "")]
public async Task<Results<NotFound<string>, StatusCodeHttpResult, Ok>> GetRefreshTicketStatus()
{
return TypedResults.Ok();
}

[HttpGet()]
[HttpPost("battle/purchase")]
[Authorize(Roles = "User", AuthenticationSchemes = "ES256K")]
[SwaggerOperation(Summary = "", Description = "")]
[SwaggerResponse(
StatusCodes.Status200OK,
"TicketStatus",
typeof(TicketStatusResponse)
)]
[SwaggerResponse(StatusCodes.Status200OK, "Purchase Log Id", typeof(int))]
[SwaggerResponse(StatusCodes.Status401Unauthorized, "")]
[SwaggerResponse(StatusCodes.Status503ServiceUnavailable, "")]
public async Task<
Results<
NotFound<string>,
StatusCodeHttpResult,
Ok
>
> GetTicketStatus(
[FromQuery] TicketType ticketType
public async Task<Results<NotFound<string>, StatusCodeHttpResult, Ok>> PurchaseBattleTicket(
[FromBody] PurchaseTicketRequest request
)
{
return TypedResults.Ok();
}

[HttpPost("purchase")]
[HttpPost("refresh/purchase")]
[Authorize(Roles = "User", AuthenticationSchemes = "ES256K")]
[SwaggerOperation(Summary = "", Description = "")]
[SwaggerResponse(
StatusCodes.Status200OK,
"Purchase Log Id",
typeof(int)
)]
[SwaggerResponse(StatusCodes.Status200OK, "Purchase Log Id", typeof(int))]
[SwaggerResponse(StatusCodes.Status401Unauthorized, "")]
[SwaggerResponse(StatusCodes.Status503ServiceUnavailable, "")]
public async Task<
Results<
NotFound<string>,
StatusCodeHttpResult,
Ok
>
> PurchaseTicket(
public async Task<Results<NotFound<string>, StatusCodeHttpResult, Ok>> PurchaseRefreshTicket(
[FromBody] PurchaseTicketRequest request
)
{
return TypedResults.Ok();
}

[HttpGet("purchase-logs/{logId}")]
[HttpGet("battle/purchase-logs/{logId}")]
[Authorize(Roles = "User", AuthenticationSchemes = "ES256K")]
[SwaggerOperation(Summary = "", Description = "")]
[SwaggerResponse(
StatusCodes.Status200OK,
"Purchase Log Id",
typeof(TicketPurchaseLogResponse)
)]
[SwaggerResponse(StatusCodes.Status200OK, "Purchase Log Id", typeof(TicketPurchaseLogResponse))]
[SwaggerResponse(StatusCodes.Status401Unauthorized, "")]
[SwaggerResponse(StatusCodes.Status503ServiceUnavailable, "")]
public async Task<
Results<
NotFound<string>,
StatusCodeHttpResult,
Ok
>
> GetPurchaseTicketLog(
int logId
)
Results<NotFound<string>, StatusCodeHttpResult, Ok>
> GetPurchaseBattleTicketLog(int logId)
{
return TypedResults.Ok();
}

[HttpGet("refresh/purchase-logs/{logId}")]
[Authorize(Roles = "User", AuthenticationSchemes = "ES256K")]
[SwaggerOperation(Summary = "", Description = "")]
[SwaggerResponse(StatusCodes.Status200OK, "Purchase Log Id", typeof(TicketPurchaseLogResponse))]
[SwaggerResponse(StatusCodes.Status401Unauthorized, "")]
[SwaggerResponse(StatusCodes.Status503ServiceUnavailable, "")]
public async Task<
Results<NotFound<string>, StatusCodeHttpResult, Ok>
> GetPurchaseRefreshTicketLog(int logId)
{
return TypedResults.Ok();
}
Expand Down
1 change: 0 additions & 1 deletion ArenaService/Dtos/PurchaseTicketRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ namespace ArenaService.Dtos;

public class PurchaseTicketRequest
{
public TicketType TicketType { get; set; }
public int TicketCount { get; set; }
}

0 comments on commit 4bd34fc

Please sign in to comment.