fix: minor fixes
This commit is contained in:
parent
beea3ab54e
commit
1a5b545f37
|
|
@ -135,7 +135,6 @@ func (h *Handler) CreateBetWithFastCode(c *fiber.Ctx) error {
|
|||
|
||||
newReq := domain.CreateBetReq{
|
||||
Amount: float32(bet.Amount),
|
||||
Status: bet.Status,
|
||||
Outcomes: bet_outcomes,
|
||||
BranchID: &branch.ID,
|
||||
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 := 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 {
|
||||
h.mongoLoggerSvc.Error("Failed to add reward to static bet",
|
||||
zap.Int("status_code", fiber.StatusOK),
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ func (h *Handler) RegisterUser(c *fiber.Ctx) error {
|
|||
|
||||
// TODO: Remove later
|
||||
_, 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")
|
||||
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -283,6 +283,7 @@ func (a *App) initAppRoutes() {
|
|||
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/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/:id", a.authMiddleware, h.GetTransactionByID)
|
||||
a.fiber.Put("/shop/transaction/:id", a.authMiddleware, h.UpdateTransactionVerified)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user