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

Allow use getDocuments method to find just one document #37

Open
danielcastill0 opened this issue Jan 21, 2021 · 0 comments
Open

Allow use getDocuments method to find just one document #37

danielcastill0 opened this issue Jan 21, 2021 · 0 comments

Comments

@danielcastill0
Copy link

Hey guys, since release of Truevault API V2, it doesn't needed to do the next validation for search document ` if (documentIds.length === 1) {

                                // Sending a single ID to the API will only return the document's contents. In order to
                                // retrieve a proper multiget response with `id` and `owner_id`, we need to send a
                                // request with two instances of the same document ID. We will then only return the
                                // first result from the response.
                                requestDocumentIds = [documentIds[0], documentIds[0]];
                            } else {
                                requestDocumentIds = documentIds;
                            }`  instead you can just code `requestDocumentIds = documentIds;` and it shoud work perfectly 
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

No branches or pull requests

1 participant