fix: minor fixes

This commit is contained in:
Samuel Tariku 2025-07-02 23:12:51 +03:00
parent beea3ab54e
commit 1a5b545f37
3 changed files with 4 additions and 3 deletions

View File

@ -135,7 +135,6 @@ func (h *Handler) CreateBetWithFastCode(c *fiber.Ctx) error {
newReq := domain.CreateBetReq{ newReq := domain.CreateBetReq{
Amount: float32(bet.Amount), Amount: float32(bet.Amount),
Status: bet.Status,
Outcomes: bet_outcomes, Outcomes: bet_outcomes,
BranchID: &branch.ID, BranchID: &branch.ID,
FullName: user.FirstName, FullName: user.FirstName,
@ -176,7 +175,8 @@ func (h *Handler) CreateBetWithFastCode(c *fiber.Ctx) error {
// amount added for fast code owner can be fetched from settings in db // amount added for fast code owner can be fetched from settings in db
amount := domain.Currency(100) amount := domain.Currency(100)
_, err = h.walletSvc.AddToWallet(c.Context(), staticWallet.ID, amount, domain.ValidInt64{}, domain.TRANSFER_DIRECT, domain.PaymentDetails{}) _, err = h.walletSvc.AddToWallet(c.Context(), staticWallet.ID, amount, domain.ValidInt64{},
domain.TRANSFER_DIRECT, domain.PaymentDetails{}, fmt.Sprintf("Added %v to static wallet by referring using fast_code", amount.Float32()))
if err != nil { if err != nil {
h.mongoLoggerSvc.Error("Failed to add reward to static bet", h.mongoLoggerSvc.Error("Failed to add reward to static bet",
zap.Int("status_code", fiber.StatusOK), zap.Int("status_code", fiber.StatusOK),

View File

@ -189,7 +189,7 @@ func (h *Handler) RegisterUser(c *fiber.Ctx) error {
// TODO: Remove later // TODO: Remove later
_, err = h.walletSvc.AddToWallet( _, err = h.walletSvc.AddToWallet(
c.Context(), newWallet.RegularID, domain.ToCurrency(100.0), domain.ValidInt64{}, domain.TRANSFER_DIRECT, domain.PaymentDetails{}, c.Context(), newWallet.RegularID, domain.ToCurrency(10000.0), domain.ValidInt64{}, domain.TRANSFER_DIRECT, domain.PaymentDetails{},
"Added 100.0 to wallet only as test for deployment") "Added 100.0 to wallet only as test for deployment")
if err != nil { if err != nil {

View File

@ -283,6 +283,7 @@ func (a *App) initAppRoutes() {
a.fiber.Get("/shop/cashout/:id", a.authMiddleware, a.CompanyOnly, h.GetShopBetByCashoutID) a.fiber.Get("/shop/cashout/:id", a.authMiddleware, a.CompanyOnly, h.GetShopBetByCashoutID)
a.fiber.Post("/shop/cashout", a.authMiddleware, a.CompanyOnly, h.CashoutByCashoutID) a.fiber.Post("/shop/cashout", a.authMiddleware, a.CompanyOnly, h.CashoutByCashoutID)
a.fiber.Post("/shop/deposit", a.authMiddleware, a.CompanyOnly, h.DepositForCustomer) a.fiber.Post("/shop/deposit", a.authMiddleware, a.CompanyOnly, h.DepositForCustomer)
// a.fiber.Get("/shop/deposit", a.authMiddleware, a.CompanyOnly, h.DepositForCustomer)
a.fiber.Get("/shop/transaction", a.authMiddleware, h.GetAllTransactions) a.fiber.Get("/shop/transaction", a.authMiddleware, h.GetAllTransactions)
a.fiber.Get("/shop/transaction/:id", a.authMiddleware, h.GetTransactionByID) a.fiber.Get("/shop/transaction/:id", a.authMiddleware, h.GetTransactionByID)
a.fiber.Put("/shop/transaction/:id", a.authMiddleware, h.UpdateTransactionVerified) a.fiber.Put("/shop/transaction/:id", a.authMiddleware, h.UpdateTransactionVerified)