Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol Binani committed Oct 23, 2023
1 parent 54ff157 commit beaf837
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/content-deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ const cds = require("@sap/cds");
const { validateNotificationTypes, readFile } = require("./utils");
const { processNotificationTypes } = require("./notificationTypes");
const { setGlobalLogLevel } = require("@sap-cloud-sdk/util");
const { basename } = require('path');

async function deployNotificationTypes() {
setGlobalLogLevel("error");

// read notification types
const fileName = path.basename(cds.env.requires?.notifications?.types);
const filePath = cds.env.requires?.notifications?.types ?? '';
const fileName = basename(filePath);
const notificationTypes = readFile(fileName);

if (validateNotificationTypes(notificationTypes)) {
Expand Down

0 comments on commit beaf837

Please sign in to comment.