fix: unique constrain, generate hashes (#90)

This commit is contained in:
Sasha 2024-09-19 02:49:34 +02:00 committed by GitHub
parent 427be338eb
commit 671347d42f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -218,7 +218,7 @@ export async function app(telemetryClient: TelemetryClient) {
contentTopic: DEFAULT_CONTENT_TOPIC, contentTopic: DEFAULT_CONTENT_TOPIC,
pubsubTopic: DEFAULT_PUBSUB_TOPIC, pubsubTopic: DEFAULT_PUBSUB_TOPIC,
ephemeral: false, ephemeral: false,
messageHash: "", messageHash: await sha256(generateRandomNumber()),
errorMessage: result.error, errorMessage: result.error,
extraData: DEFAULT_EXTRA_DATA_STR, extraData: DEFAULT_EXTRA_DATA_STR,
}); });
@ -237,7 +237,7 @@ export async function app(telemetryClient: TelemetryClient) {
contentTopic: DEFAULT_CONTENT_TOPIC, contentTopic: DEFAULT_CONTENT_TOPIC,
pubsubTopic: DEFAULT_PUBSUB_TOPIC, pubsubTopic: DEFAULT_PUBSUB_TOPIC,
ephemeral: false, ephemeral: false,
messageHash: "", messageHash: await sha256(generateRandomNumber()),
errorMessage: fail.error, errorMessage: fail.error,
extraData, extraData,
}; };
@ -256,7 +256,7 @@ export async function app(telemetryClient: TelemetryClient) {
contentTopic: DEFAULT_CONTENT_TOPIC, contentTopic: DEFAULT_CONTENT_TOPIC,
pubsubTopic: DEFAULT_PUBSUB_TOPIC, pubsubTopic: DEFAULT_PUBSUB_TOPIC,
ephemeral: false, ephemeral: false,
messageHash: "", messageHash: await sha256(generateRandomNumber()),
errorMessage: "", errorMessage: "",
extraData, extraData,
}; };