Skip to content
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

Merged
merged 17 commits into from
May 10, 2024
Merged

Sdmext279/read document #6

merged 17 commits into from
May 10, 2024

Conversation

rishikunnath2747
Copy link
Contributor

@rishikunnath2747 rishikunnath2747 commented May 7, 2024

JIRA: https://jira.tools.sap/browse/SDMEXT-279
This PR covers Read Attachment use-case & UTs.

test/lib/handler/index.test.js Fixed Show fixed Hide fixed
test/lib/handler/index.test.js Fixed Show fixed Hide fixed
test/lib/handler/index.test.js Fixed Show fixed Hide fixed
test/lib/handler/index.test.js Fixed Show fixed Hide fixed
test/lib/handler/index.test.js Fixed Show fixed Hide fixed
Copy link
Member

@yashmeet29 yashmeet29 left a 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

yashmeet29

This comment was marked as duplicate.

Copy link
Member

@yashmeet29 yashmeet29 left a 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

Copy link
Member

@yashmeet29 yashmeet29 left a 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.

async function readDocument(Key, token, uri){
const { repositoryId } = getConfigurations();
const documentReadURL = uri+ "browser/" + repositoryId + "/root?objectID=" + Key + "&cmisselector=content";
console.log('Check url: ', documentReadURL);
Copy link
Contributor

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");
Copy link
Contributor

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

test/lib/handler/index.test.js Dismissed Show dismissed Hide dismissed
test/lib/handler/index.test.js Dismissed Show dismissed Hide dismissed
test/lib/handler/index.test.js Fixed Show fixed Hide fixed
test/lib/handler/index.test.js Fixed Show fixed Hide fixed
test/lib/handler/index.test.js Fixed Show fixed Hide fixed
test/lib/handler/index.test.js Dismissed Show dismissed Hide dismissed
Comment on lines 5 to 7
async function readAttachment(Key,token,credentials) {
try {
const document = await readDocument(Key,token,credentials.uri)
Copy link
Member

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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this import

Copy link
Member

@yashmeet29 yashmeet29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Copy link

@maheshsooryambylu maheshsooryambylu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@rishikunnath2747 rishikunnath2747 merged commit 36fbdb0 into develop May 10, 2024
3 checks passed
@chgeo chgeo deleted the SDMEXT279/readDocument branch May 16, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants