hotfix:commenting provider code for demo
This commit is contained in:
parent
632c3061e7
commit
c77355ad4c
|
|
@ -95,15 +95,15 @@ func (s *Service) GetGames(ctx context.Context, req domain.GameListRequest) ([]d
|
||||||
|
|
||||||
func (s *Service) StartGame(ctx context.Context, req domain.GameStartRequest) (*domain.GameStartResponse, error) {
|
func (s *Service) StartGame(ctx context.Context, req domain.GameStartRequest) (*domain.GameStartResponse, error) {
|
||||||
// 1. Check if provider is enabled in DB
|
// 1. Check if provider is enabled in DB
|
||||||
provider, err := s.repo.GetVirtualGameProviderByID(ctx, req.ProviderID)
|
// provider, err := s.repo.GetVirtualGameProviderByID(ctx, req.ProviderID)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return nil, fmt.Errorf("failed to check provider %s: %w", req.ProviderID, err)
|
// return nil, fmt.Errorf("failed to check provider %s: %w", req.ProviderID, err)
|
||||||
}
|
// }
|
||||||
|
|
||||||
if !provider.Enabled {
|
// if !provider.Enabled {
|
||||||
// Provider exists but is disabled → return error
|
// // Provider exists but is disabled → return error
|
||||||
return nil, fmt.Errorf("provider %s is disabled", req.ProviderID)
|
// return nil, fmt.Errorf("provider %s is disabled", req.ProviderID)
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 2. Prepare signature params
|
// 2. Prepare signature params
|
||||||
sigParams := map[string]any{
|
sigParams := map[string]any{
|
||||||
|
|
@ -131,15 +131,15 @@ func (s *Service) StartGame(ctx context.Context, req domain.GameStartRequest) (*
|
||||||
|
|
||||||
func (s *Service) StartDemoGame(ctx context.Context, req domain.DemoGameRequest) (*domain.GameStartResponse, error) {
|
func (s *Service) StartDemoGame(ctx context.Context, req domain.DemoGameRequest) (*domain.GameStartResponse, error) {
|
||||||
// 1. Check if provider is enabled in DB
|
// 1. Check if provider is enabled in DB
|
||||||
provider, err := s.repo.GetVirtualGameProviderByID(ctx, req.ProviderID)
|
// provider, err := s.repo.GetVirtualGameProviderByID(ctx, req.ProviderID)
|
||||||
if err != nil {
|
// if err != nil {
|
||||||
return nil, fmt.Errorf("failed to check provider %s: %w", req.ProviderID, err)
|
// return nil, fmt.Errorf("failed to check provider %s: %w", req.ProviderID, err)
|
||||||
}
|
// }
|
||||||
|
|
||||||
if !provider.Enabled {
|
// if !provider.Enabled {
|
||||||
// Provider exists but is disabled → return error
|
// // Provider exists but is disabled → return error
|
||||||
return nil, fmt.Errorf("provider %s is disabled", req.ProviderID)
|
// return nil, fmt.Errorf("provider %s is disabled", req.ProviderID)
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 2. Prepare signature params
|
// 2. Prepare signature params
|
||||||
sigParams := map[string]any{
|
sigParams := map[string]any{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user