mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-30 10:34:21 +01:00
Refactor EventStore to use a more Set-like interface
This commit is contained in:
@@ -51,7 +51,7 @@ async function updateEvent<K extends number, E extends EventStub<K>>(
|
||||
fn: (prev: Event<K> | undefined) => E,
|
||||
c: AppContext,
|
||||
): Promise<Event<K>> {
|
||||
const [prev] = await eventsDB.getEvents([filter], { limit: 1 });
|
||||
const [prev] = await eventsDB.filter([filter], { limit: 1 });
|
||||
return createEvent(fn(prev), c);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user