push points

This commit is contained in:
Aditya Siregar 2025-09-18 12:42:07 +07:00
parent d3db08fd15
commit c7828a5cad
3 changed files with 3 additions and 5 deletions

View File

@ -56,5 +56,4 @@ type GetFerrisWheelGameResponse struct {
type GetFerrisWheelGameResponseData struct {
Game CustomerGameResponse `json:"game"`
Prizes []CustomerGamePrizeResponse `json:"prizes"`
}

View File

@ -307,7 +307,6 @@ func (p *CustomerPointsProcessor) GetFerrisWheelGameAPI(ctx context.Context) (*m
Message: "Ferris Wheel game retrieved successfully.",
Data: &models.GetFerrisWheelGameResponseData{
Game: gameResponse,
Prizes: prizeResponses,
},
}, nil
}

View File

@ -48,7 +48,7 @@ func (r *customerPointsRepository) GetCustomerTotalTokens(ctx context.Context, c
err := r.db.WithContext(ctx).
Model(&entities.CustomerTokens{}).
Where("customer_id = ?", customerID).
Select("COALESCE(SUM(tokens), 0)").
Select("COALESCE(SUM(balance), 0)").
Scan(&totalTokens).Error
if err != nil {