Skip to content

Commit 3106bca

Browse files
fix: decrement calls correct query
1 parent 8f8dd79 commit 3106bca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/stores/individual_ip/store_individual_ip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class PostgresStoreIndividualIP implements Store {
134134
WITH
135135
rows_to_delete AS (
136136
SELECT id FROM rate_limit.individual_records
137-
WHERE key = $1 and session_id = $2 ORDER BY registered_at LIMIT 1
137+
WHERE key = $1 and session_id = $2 ORDER BY event_time LIMIT 1
138138
)
139139
DELETE FROM rate_limit.individual_records
140140
USING rows_to_delete WHERE individual_records.id = rows_to_delete.id

0 commit comments

Comments
 (0)