This commit is contained in:
2026-10-03 01:16:40 +07:00
parent 3f7731411b
commit c69dfb8503
10 changed files with 234 additions and 59 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ func (s *server) AcceptTicket(ctx context.Context, req *proto.AcceptTicketReq) (
}
page, err := s.ticketService.Accept(ctx, req.Token, claims.UserID)
if err != nil {
return &proto.AcceptTicketRsp{Error: err.Error()}, nil
return nil, ticketErrorStatus(err, "не удалось принять билет")
}
result := &proto.TicketPage{ID: int32(page.ID), GameName: page.GameName, StartAt: timestamppb.New(page.StartAt), Status: page.Status, GameStatus: page.GameStatus}
if page.Location != nil {
@@ -82,7 +82,7 @@ func (s *server) IssueGameTickets(ctx context.Context, req *proto.IssueGameTicke
tickets, err := s.ticketService.Issue(ctx, int(req.GameID), int(req.Count))
if err != nil {
return &proto.IssueGameTicketsRsp{Error: err.Error()}, nil
return nil, ticketErrorStatus(err, "не удалось выпустить билеты")
}
result := make([]*proto.Ticket, 0, len(tickets))