diff --git a/internal/web_server/cron.go b/internal/web_server/cron.go index dc7f2d4..184e805 100644 --- a/internal/web_server/cron.go +++ b/internal/web_server/cron.go @@ -18,7 +18,7 @@ func StartDataFetchingCrons(eventService eventsvc.Service, oddsService oddssvc.S task func() }{ { - spec: "0 0 * * * *",, // Every 1 hour + spec: "0 0 * * * *", // Every 1 hour task: func() { if err := eventService.FetchUpcomingEvents(context.Background()); err != nil { log.Printf("FetchUpcomingEvents error: %v", err) @@ -35,12 +35,12 @@ func StartDataFetchingCrons(eventService eventsvc.Service, oddsService oddssvc.S // }, // }, { - spec: "0 */15 * * * *", // Every 15 minutes - task: func() { - if err := oddsService.FetchNonLiveOdds(context.Background()); err != nil { - log.Printf("FetchNonLiveOdds error: %v", err) - } - }, + spec: "0 */15 * * * *", // Every 15 minutes + task: func() { + if err := oddsService.FetchNonLiveOdds(context.Background()); err != nil { + log.Printf("FetchNonLiveOdds error: %v", err) + } + }, }, { spec: "*/10 * * * * *", diff --git a/internal/web_server/handlers/user.go b/internal/web_server/handlers/user.go index a02140e..09fd436 100644 --- a/internal/web_server/handlers/user.go +++ b/internal/web_server/handlers/user.go @@ -20,14 +20,6 @@ type CheckPhoneEmailExistRes struct { EmailExist bool `json:"email_exist"` PhoneNumberExist bool `json:"phone_number_exist"` } -type CheckPhoneEmailExistReq struct { - Email string `json:"email" validate:"email" example:"john.doe@example.com"` - PhoneNumber string `json:"phone_number" validate:"required" example:"1234567890"` -} -type CheckPhoneEmailExistRes struct { - EmailExist bool `json:"email_exist"` - PhoneNumberExist bool `json:"phone_number_exist"` -} // CheckPhoneEmailExist godoc // @Summary Check if phone number or email exist @@ -69,10 +61,6 @@ type RegisterCodeReq struct { Email string `json:"email" example:"john.doe@example.com"` PhoneNumber string `json:"phone_number" example:"1234567890"` } -type RegisterCodeReq struct { - Email string `json:"email" validate:"email" example:"john.doe@example.com"` - PhoneNumber string `json:"phone_number" validate:"required_without=Email" example:"1234567890"` -} // SendRegisterCode godoc // @Summary Send register code @@ -263,12 +251,6 @@ type ResetPasswordReq struct { Password string `json:"password" validate:"required,min=8" example:"newpassword123"` Otp string `json:"otp" validate:"required" example:"123456"` } -type ResetPasswordReq struct { - Email string - PhoneNumber string - Password string - Otp string -} // ResetPassword godoc // @Summary Reset password diff --git a/internal/web_server/handlers/virtual_games_hadlers.go b/internal/web_server/handlers/virtual_games_hadlers.go index 8089561..715a051 100644 --- a/internal/web_server/handlers/virtual_games_hadlers.go +++ b/internal/web_server/handlers/virtual_games_hadlers.go @@ -15,16 +15,6 @@ type launchVirtualGameRes struct { LaunchURL string `json:"launch_url"` } -type launchVirtualGameReq struct { - GameID string `json:"game_id" validate:"required" example:"crash_001"` - Currency string `json:"currency" validate:"required,len=3" example:"USD"` - Mode string `json:"mode" validate:"required,oneof=REAL DEMO" example:"REAL"` -} - -type launchVirtualGameRes struct { - LaunchURL string `json:"launch_url"` -} - // LaunchVirtualGame godoc // @Summary Launch a PopOK virtual game // @Description Generates a URL to launch a PopOK game diff --git a/internal/web_server/handlers/wallet_handler.go b/internal/web_server/handlers/wallet_handler.go index 9a3e28b..cf1bce6 100644 --- a/internal/web_server/handlers/wallet_handler.go +++ b/internal/web_server/handlers/wallet_handler.go @@ -10,7 +10,7 @@ import ( ) type UpdateWalletActiveReq struct { - IsActive bool `json:"is_active" validate:"required" example:"true"` + IsActive bool `json:"is_active" validate:"required" example:"true"` } type WalletRes struct { ID int64 `json:"id" example:"1"` @@ -178,10 +178,6 @@ func (h *Handler) GetAllBranchWallets(c *fiber.Ctx) error { } -type UpdateWalletActiveReq struct { - IsActive bool `json:"is_active" validate:"required" example:"true"` -} - // UpdateWalletActive godoc // @Summary Activate and Deactivate Wallet // @Description Can activate and deactivate wallet