1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-19 17:52:45 +02:00

keep the code similar to the previous one

This commit is contained in:
Gastón Fournier 2025-08-19 17:50:05 +02:00
parent 553c5c4927
commit 4a064ec0bb
No known key found for this signature in database
GPG Key ID: AF45428626E17A8E

View File

@ -217,12 +217,12 @@ export class EventStore implements IEventStore {
environment?: string,
): Promise<number> {
const stopTimer = this.metricTimer('getMaxRevisionId');
const query = this.db(TABLE)
const row = await this.db(TABLE)
.max('id')
.where(this.typeIsInteresting(environment))
.andWhere('id', '>=', largerThan);
.andWhere('id', '>=', largerThan)
.first();
const row = await query.first();
stopTimer();
return row?.max ?? 0;
}