Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions TickAPI/TickAPI.Tests/Tickets/Services/TicketServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ public async Task GetTicketsForCustomerAsync_WithValidInput_ReturnsSuccessResult
false,
new PaginationDetails(0, 2)
);
var mappedData1 = new GetTicketForCustomerDto(tickets[0].Id, "EventName", new DateTime(2025, 10, 10), new DateTime(2025, 10, 20), false);
var mappedData2 = new GetTicketForCustomerDto(tickets[1].Id, "EventName2", new DateTime(2025, 11, 10), new DateTime(2025, 11, 20), false);
var mappedData1 = new GetTicketForCustomerDto(tickets[0].Id, "EventName", new DateTime(2025, 10, 10), new DateTime(2025, 10, 20), false, false, null, null);
var mappedData2 = new GetTicketForCustomerDto(tickets[1].Id, "EventName2", new DateTime(2025, 11, 10), new DateTime(2025, 11, 20), false, false, null, null);
var mappedPaginatedData = new PaginatedData<GetTicketForCustomerDto>
(
new List<GetTicketForCustomerDto>{mappedData1, mappedData2},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ public record GetTicketDetailsResponseDto
GetTicketDetailsAddressDto Address,
Guid eventId,
string qrcode,
bool Used
bool Used,
bool ForResell,
decimal? ResellPrice,
string? ResellCurrency
);
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ public record GetTicketForCustomerDto
string EventName,
DateTime EventStartDate,
DateTime EventEndDate,
bool Used
bool Used,
bool ForResell,
decimal? ResellPrice,
string? ResellCurrency
);
7 changes: 5 additions & 2 deletions TickAPI/TickAPI/Tickets/Services/TicketService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public async Task<Result<PaginatedData<GetTicketForCustomerDto>>> GetTicketsForC
}

var paginatedResult = _paginationService.MapData(paginatedCustomerTickets.Value!,
t => new GetTicketForCustomerDto(t.Id, t.Type.Event.Name, t.Type.Event.StartDate, t.Type.Event.EndDate, t.Used));
t => new GetTicketForCustomerDto(t.Id, t.Type.Event.Name, t.Type.Event.StartDate, t.Type.Event.EndDate, t.Used, t.ForResell, t.ResellPrice, t.ResellCurrency));

return Result<PaginatedData<GetTicketForCustomerDto>>.Success(paginatedResult);
}
Expand Down Expand Up @@ -164,7 +164,10 @@ public async Task<Result<GetTicketDetailsResponseDto>> GetTicketDetailsAsync(Gui
address,
ticket.Type.Event.Id,
qrcode,
ticket.Used
ticket.Used,
ticket.ForResell,
ticket.ResellPrice,
ticket.ResellCurrency
);
return Result<GetTicketDetailsResponseDto>.Success(ticketDetails);
}
Expand Down
Loading