Skip to content

Commit 074a3aa

Browse files
committed
fix(entity-feedback): Add link to feedback notifications
Add link field to notification payload so users can navigate directly to the entity's feedback page when they receive a notification about new feedback on their owned entities. Notifications now include a clickable link in the format: /catalog/{namespace}/{kind}/{name}/feedback
1 parent 2c5e862 commit 074a3aa

File tree

1 file changed

+7
-0
lines changed
  • workspaces/entity-feedback/plugins/entity-feedback-backend/src/service

1 file changed

+7
-0
lines changed

workspaces/entity-feedback/plugins/entity-feedback-backend/src/service/router.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,16 @@ export async function createRouter(
227227
type: 'entity',
228228
entityRef: entityOwner,
229229
};
230+
231+
// Construct entity URL from entityRef (format: "kind:namespace/name")
232+
const [kind, namespaceName] = req.params.entityRef.split(':');
233+
const [namespace, name] = namespaceName.split('/');
234+
const entityUrl = `/catalog/${namespace}/${kind}/${name}/feedback`;
235+
230236
const payload: NotificationPayload = {
231237
title: `New feedback for ${req.params.entityRef}`,
232238
description: `Comments: ${JSON.parse(comments).additionalComments}`,
239+
link: entityUrl,
233240
};
234241
await notificationService.send({
235242
recipients,

0 commit comments

Comments
 (0)