-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sdmext279/read document #6
Conversation
Unit test cases added for readDocument in sdm.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add Jira link in PR description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please only add changes related to readAttachment in this PR. Please remove changes related to attach & delete usecase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove coverage folder & it's files from the PR. These files won't be pushed to github. Also, remove package-lock.json too.
lib/handler/index.js
Outdated
async function readDocument(Key, token, uri){ | ||
const { repositoryId } = getConfigurations(); | ||
const documentReadURL = uri+ "browser/" + repositoryId + "/root?objectID=" + Key + "&cmisselector=content"; | ||
console.log('Check url: ', documentReadURL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls remove the console
lib/sdm.js
Outdated
const content = await readAttachment(Key, token, this.creds); | ||
return content; | ||
} | ||
throw new Error("Url not found"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we put this message in message constant file
lib/handler/index.js
Outdated
async function readAttachment(Key,token,credentials) { | ||
try { | ||
const document = await readDocument(Key,token,credentials.uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add spaces after commas in readAttachment() & readDocument()
lib/sdm.js
Outdated
} = require("../lib/persistence"); | ||
const { duplicateFileErr } = require("./util/messageConsts"); | ||
const { fileNotFoundErr } = require("./util/messageConsts"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
JIRA: https://jira.tools.sap/browse/SDMEXT-279
This PR covers Read Attachment use-case & UTs.