I am in process of upgrading my NodeJS to the latest SDK which is 3.2.x to be able to take advantage of the native support of await etc and to upgrade my Servers to 7.x since they are still on 6.6.2 .
As i tried to implement the buckets and collections and do some basic Data operations i cam across the following. When i do a getDoc like this
const result = await couch.getDoc('contacts', 'user::8D6D24A5-D669-45DC-99AC-F257BDA133A4')
The Docs call for
const result = await collection.get(key);
document = result.value;
but when i do that i get an undefined for document. I know i got a good doc as if i print result to my console i get what i expect.
{
id: 'user::8D6D24A5-D669-45DC-99AC-F257BDA133A4',
result: GetResult {
content: {
_id: '8D6D24A5-D669-45DC-99AC-F257BDA133A4',
_type: 'user',
emails: [Array],
mailing_address: [Object],
name: [Object],
office365: [Object],
office_address: [Object],
phones: [Array],
security: [Object],
username: 'demoUser'
},
cas: CbCas { '0': <Buffer 00 00 e5 25 7e 48 c9 16> },
expiryTime: undefined
}
}
So my question, is this a doc issue or an issue related how 6.6.2 response vs 7.x ?