showing logs on upcoming events
This commit is contained in:
parent
f68155dccd
commit
b5166fa53d
|
|
@ -1,6 +1,7 @@
|
|||
package handlers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
|
||||
|
|
@ -119,7 +120,9 @@ func (h *Handler) GetAllUpcomingEvents(c *fiber.Ctx) error {
|
|||
|
||||
events, total, err := h.eventSvc.GetPaginatedUpcomingEvents(c.Context(), int32(pageSize), int32(page)-1, leagueID, sportID)
|
||||
|
||||
fmt.Printf("League ID: %v", leagueID)
|
||||
if err != nil {
|
||||
h.logger.Error("getting error", err)
|
||||
return response.WriteJSON(c, fiber.StatusInternalServerError, "Failed to retrieve all upcoming events", nil, nil)
|
||||
}
|
||||
|
||||
|
|
@ -190,4 +193,3 @@ func (h *Handler) GetPrematchOddsByUpcomingID(c *fiber.Ctx) error {
|
|||
return response.WriteJSON(c, fiber.StatusOK, "Prematch odds retrieved successfully", odds, nil)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ func (h *Handler) TransferToWallet(c *fiber.Ctx) error {
|
|||
} else if role == string(domain.RoleBranchManager) || role == string(domain.RoleAdmin) || role == string(domain.RoleSuperAdmin) {
|
||||
company, err := h.companySvc.GetCompanyByID(c.Context(), companyID)
|
||||
if err != nil {
|
||||
return response.WriteJSON(c, fiber.StatusInternalServerError, "Unauthorized access", nil, nil)
|
||||
return response.WriteJSON(c, fiber.StatusInternalServerError, "Error fetching company", err, nil)
|
||||
}
|
||||
senderID = company.WalletID
|
||||
h.logger.Error("Will", "userID", userID, "role", role)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user