sports bet route fix
This commit is contained in:
parent
12855f3690
commit
036d598ebe
|
|
@ -110,10 +110,14 @@ func (s *Service) InitiateDeposit(ctx context.Context, userID int64, amount doma
|
|||
return "", fmt.Errorf("failed to initialize payment: %w", err)
|
||||
}
|
||||
|
||||
if _, err := s.transferStore.CreateTransfer(ctx, transfer); err != nil {
|
||||
tempTransfer, err := s.transferStore.CreateTransfer(ctx, transfer)
|
||||
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to save payment: %w", err)
|
||||
}
|
||||
|
||||
fmt.Printf("\n\nTemp transfer is: %v\n\n", tempTransfer)
|
||||
|
||||
return response.CheckoutURL, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -180,12 +180,12 @@ func (a *App) initAppRoutes() {
|
|||
a.fiber.Get("/ticket/:id", h.GetTicketByID)
|
||||
|
||||
// Bet Routes
|
||||
a.fiber.Post("/bet", a.authMiddleware, h.CreateBet)
|
||||
a.fiber.Get("/bet", a.authMiddleware, h.GetAllBet)
|
||||
a.fiber.Get("/bet/:id", h.GetBetByID)
|
||||
a.fiber.Get("/bet/cashout/:id", a.authMiddleware, h.GetBetByCashoutID)
|
||||
a.fiber.Patch("/bet/:id", a.authMiddleware, h.UpdateCashOut)
|
||||
a.fiber.Delete("/bet/:id", a.authMiddleware, h.DeleteBet)
|
||||
a.fiber.Post("/sport/bet", a.authMiddleware, h.CreateBet)
|
||||
a.fiber.Get("/sport/bet", a.authMiddleware, h.GetAllBet)
|
||||
a.fiber.Get("/sport/bet/:id", h.GetBetByID)
|
||||
a.fiber.Get("/sport/bet/cashout/:id", a.authMiddleware, h.GetBetByCashoutID)
|
||||
a.fiber.Patch("/sport/bet/:id", a.authMiddleware, h.UpdateCashOut)
|
||||
a.fiber.Delete("/sport/bet/:id", a.authMiddleware, h.DeleteBet)
|
||||
|
||||
a.fiber.Post("/random/bet", a.authMiddleware, h.RandomBet)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user