Skip to content

Commit ca9d4a3

Browse files
committed
fix(webapp): make seeded webhook deliveries open from the list
The delivery seed script minted `id` and `friendlyId` as two independent ids, but the detail lookup derives the row id from the friendlyId, so every seeded delivery's page reported that the delivery could not be found.
1 parent 2550353 commit ca9d4a3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

apps/webapp/seed-webhook-deliveries.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,13 @@ async function main() {
469469
[ep.spec.signatureHeader.toLowerCase()]:
470470
status === "FAILED" ? "tampered" : `sig_${nanoid()}`,
471471
};
472+
// friendlyId must be the id plus the prefix, matching WebhookDeliveryId. The detail
473+
// lookup strips "whd_" and queries Postgres by `id`, so minting the two independently
474+
// makes every seeded delivery's detail page 404.
475+
const deliveryId = nanoid();
472476
rows.push({
473-
id: nanoid(),
474-
friendlyId: `whd_${nanoid()}`,
477+
id: deliveryId,
478+
friendlyId: `whd_${deliveryId}`,
475479
endpointId: ep.id,
476480
source: ep.spec.source,
477481
status,

0 commit comments

Comments
 (0)