Skip to content

Commit

Permalink
await db write
Browse files Browse the repository at this point in the history
  • Loading branch information
malteish committed Sep 4, 2024
1 parent a5091f3 commit 3db3ddf
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { DeliveryServiceProperties } from '@dm3-org/dm3-lib-delivery';
import { EncryptionEnvelop, schema } from '@dm3-org/dm3-lib-messaging';
import {
EncryptionEnvelop,
getEnvelopSize,
schema,
} from '@dm3-org/dm3-lib-messaging';
import { DeliveryServiceProfileKeys } from '@dm3-org/dm3-lib-profile';
import {
IWebSocketManager,
Expand Down Expand Up @@ -71,7 +75,7 @@ export async function handleSubmitMessage(

try {
await messageProcessor.processEnvelop(envelop);
db.countMessage(envelop.message.size);
await db.countMessage(getEnvelopSize(envelop));
res.sendStatus(200);
} catch (error) {
console.error('handle submit message error');
Expand Down

0 comments on commit 3db3ddf

Please sign in to comment.