From 671347d42f32adba9fcdfceb4bf2eac6a2bdf6d5 Mon Sep 17 00:00:00 2001 From: Sasha <118575614+weboko@users.noreply.github.com> Date: Thu, 19 Sep 2024 02:49:34 +0200 Subject: [PATCH] fix: unique constrain, generate hashes (#90) --- examples/dogfooding/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/dogfooding/src/index.ts b/examples/dogfooding/src/index.ts index 1701e4f..30d5d07 100644 --- a/examples/dogfooding/src/index.ts +++ b/examples/dogfooding/src/index.ts @@ -218,7 +218,7 @@ export async function app(telemetryClient: TelemetryClient) { contentTopic: DEFAULT_CONTENT_TOPIC, pubsubTopic: DEFAULT_PUBSUB_TOPIC, ephemeral: false, - messageHash: "", + messageHash: await sha256(generateRandomNumber()), errorMessage: result.error, extraData: DEFAULT_EXTRA_DATA_STR, }); @@ -237,7 +237,7 @@ export async function app(telemetryClient: TelemetryClient) { contentTopic: DEFAULT_CONTENT_TOPIC, pubsubTopic: DEFAULT_PUBSUB_TOPIC, ephemeral: false, - messageHash: "", + messageHash: await sha256(generateRandomNumber()), errorMessage: fail.error, extraData, }; @@ -256,7 +256,7 @@ export async function app(telemetryClient: TelemetryClient) { contentTopic: DEFAULT_CONTENT_TOPIC, pubsubTopic: DEFAULT_PUBSUB_TOPIC, ephemeral: false, - messageHash: "", + messageHash: await sha256(generateRandomNumber()), errorMessage: "", extraData, };