Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
KranjQ committed Dec 15, 2024
1 parent 8df8100 commit 8285aaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/pkg/payments/repo/payments.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func New(db *sql.DB, logger *zap.Logger) *Storage {
}

func (repo *Storage) AddBalance(ctx context.Context, userID int, amount int) error {
query := `INSERT INTO balance (user_id, balance) VALUES ($1, $2)`
query := `INSERT INTO balance (userID, balance) VALUES ($1, $2)`
_, err := repo.DB.ExecContext(ctx, query, userID, amount)
if err != nil {
return fmt.Errorf("failed to add balance: %w", err)
Expand All @@ -30,7 +30,7 @@ func (repo *Storage) AddBalance(ctx context.Context, userID int, amount int) err
}

func (repo *Storage) AddDailyLikeCount(ctx context.Context, userID int, amount int) error {
query := `INSERT INTO daily_likes (user_id, likes_count) VALUES ($1, $2)`
query := `INSERT INTO daily_likes (userID, likes_count) VALUES ($1, $2)`
_, err := repo.DB.ExecContext(ctx, query, userID, amount)
if err != nil {
return fmt.Errorf("failed to add balance: %w", err)
Expand All @@ -39,7 +39,7 @@ func (repo *Storage) AddDailyLikeCount(ctx context.Context, userID int, amount i
}

func (repo *Storage) AddPurchasedLikeCount(ctx context.Context, userID int, amount int) error {
query := `INSERT INTO purchased_likes (user_id, likes_count) VALUES ($1, $2)`
query := `INSERT INTO purchased_likes (userID, likes_count) VALUES ($1, $2)`
_, err := repo.DB.ExecContext(ctx, query, userID, amount)
if err != nil {
return fmt.Errorf("failed to add balance: %w", err)
Expand Down

0 comments on commit 8285aaf

Please sign in to comment.