Skip to content

Commit

Permalink
feat: add checkAtMost parameter to getMostAllowedBlocked
Browse files Browse the repository at this point in the history
see upstash/core-analytics#38 for more details
  • Loading branch information
CahidArda committed Jul 18, 2024
1 parent a239d58 commit 58815e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ export class Analytics {
return result
}

public async getMostAllowedBlocked(timestampCount: number, getTop?: number) {
public async getMostAllowedBlocked(timestampCount: number, getTop?: number, checkAtMost?: number) {
getTop = getTop ?? 5
return this.analytics.getMostAllowedBlocked(this.table, timestampCount, getTop)
const timestamp = undefined // let the analytics handle getting the timestamp
return this.analytics.getMostAllowedBlocked(this.table, timestampCount, getTop, timestamp, checkAtMost)
}
}

0 comments on commit 58815e8

Please sign in to comment.