Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbrm committed Jun 23, 2023
1 parent ce8acc5 commit 3309c5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/skus/storage/repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ func (r *Order) GetTimeBounds(ctx context.Context, dbi sqlx.QueryerContext, id u
// It uses the maximum of the order items' valid_for_iso as inverval, and falls back to 1 month.
func (r *Order) GetExpiresAtAfterISOPeriod(ctx context.Context, dbi sqlx.QueryerContext, id uuid.UUID) (time.Time, error) {
const q = `SELECT COALESCE(last_paid_at, now()) +
(SELECT COALESCE(MAX(valid_for_iso::interval), interval '1 month') FROM order_items WHERE order_id = $2)
AS expires_at
(SELECT COALESCE(MAX(valid_for_iso::interval), interval '1 month') FROM order_items WHERE order_id = $2)
AS expires_at
FROM orders WHERE id = $1`

var result time.Time
Expand Down

0 comments on commit 3309c5e

Please sign in to comment.