Skip to content

Commit

Permalink
resolving the default prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
RamIndia committed Oct 27, 2023
1 parent a1b0931 commit 0e557e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,12 @@ async function getNotificationDestination() {
}

function getPrefix() {
return cds.env.requires.notifications?.prefix ?? basename(cds.root);
let prefix = cds.env.requires.notifications?.prefix;
if (prefix) {
return prefix === "$app-name" ? process.env.npm_package_name : prefix;
} else {
return basename(cds.root);
}
}

function getNotificationTypesKeyWithPrefix(notificationTypeKey) {
Expand Down

0 comments on commit 0e557e6

Please sign in to comment.