From 4992bc8652ce6164e51faf262916db7fc294871e Mon Sep 17 00:00:00 2001 From: suchitrapanda Date: Mon, 4 Nov 2024 14:33:47 +0530 Subject: [PATCH] CDS 8 Update (#44) * cds 8 changes --- db/schema.cds | 4 ++-- package.json | 9 ++++----- srv/service.js | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/db/schema.cds b/db/schema.cds index c1ba3e9..dfc3065 100644 --- a/db/schema.cds +++ b/db/schema.cds @@ -28,5 +28,5 @@ entity StatusValues { annotate Notifications with { businessPartnerId @title:'BusinessPartner ID' @readonly; - verificationStatus @title:'Verfication Status' @assert.enum; -} \ No newline at end of file + verificationStatus @title:'Verfication Status'; +} diff --git a/package.json b/package.json index 9b02a08..e3d3dd0 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,10 @@ "dependencies": { "@sap-cloud-sdk/http-client": "^3.2.0", "@sap-cloud-sdk/util": "^3.2.0", - "@sap/cds": "^7", - "@sap/cds-hana": "^2", - "@sap/xb-msg-amqp-v100": "^0.9.39", - "@sap/xsenv": "^3.1.1", - "@sap/xssec": "^3.6.0", + "@sap/cds": "^8", + "@cap-js/hana": "^1", + "@sap/xb-msg-amqp-v100": "^0.9.39", + "@sap/xssec": "^4", "express": "^4", "grunt": "^1.5.3", "npm": "^8.11.0", diff --git a/srv/service.js b/srv/service.js index cbe7deb..beceec2 100644 --- a/srv/service.js +++ b/srv/service.js @@ -121,7 +121,7 @@ const cds = require('@sap/cds'); const addressResult = resultJoin.addresses[0]; const statusValues={"N":"NEW", "P":"PROCESS", "INV":"INVALID", "V":"VERIFIED"} - if(addressResult.isModified){ + if(addressResult && addressResult.isModified){ let payload = { streetName: addressResult.streetName, postalCode: addressResult.postalCode