Skip to content

Commit

Permalink
use model instead of file
Browse files Browse the repository at this point in the history
  • Loading branch information
zongqichen committed Jan 13, 2025
1 parent 692ade4 commit 938aaf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/ord.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ const initializeAppConfig = (csn) => {
switch (keyDefinition.kind) {
case CDS_ELEMENT_KIND.service:
// Patch: hidden mtx
if (!keyDefinition["@cds.external"] && !key.includes("mtx")) {
if (!keyDefinition["@cds.external"]) {
Logger.info(key)
serviceNames.push(key);
}
break;
Expand Down
2 changes: 1 addition & 1 deletion lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cds.on("bootstrap", (app) => {

app.get("/open-resource-discovery/v1/documents/1", async (req, res) => {
try {
const csn = await cds.load(cds.env.folders.srv);
const csn = cds.model;
const data = ord(csn);
return res.status(200).send(data);
} catch (error) {
Expand Down

0 comments on commit 938aaf9

Please sign in to comment.