mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-18 22:14:23 +01:00
Upgrade NSpec, update count interface
This commit is contained in:
@@ -96,7 +96,7 @@ function connectStream(socket: WebSocket) {
|
||||
|
||||
/** Handle COUNT. Return the number of events matching the filters. */
|
||||
async function handleCount([_, subId, ...rest]: ClientCOUNT): Promise<void> {
|
||||
const count = await eventsDB.count(prepareFilters(rest));
|
||||
const { count } = await eventsDB.count(prepareFilters(rest));
|
||||
send(['COUNT', subId, { count, approximate: false }]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user