Skip to content
Snippets Groups Projects
Commit 41437d87 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

test

parent 85d22453
No related branches found
No related tags found
2 merge requests!19Feat/us858 save expiration date,!17fix/US846-onDelete
......@@ -14,10 +14,15 @@ async function saveAccountData(accountId, accountData) {
return account
}
async function getAccount(accountId) {
async function getAccount(accountId, accountRev) {
log('info', `getAccount: ${accountId}`)
const accounts = await cozyClient.data.findAll('io.cozy.accounts')
log('info', `getAccount: ${JSON.stringify(accounts)}`)
const body = await cozyClient.fetchJSON(
'GET',
`/data/io.cozy.accounts/${accountId}?rev=${accountRev}`
)
log('info', `getAccount: ${body}`)
return accounts.filter(account =>
isLocal() ? account._id === accountId : account.account_type === accountId
)[0]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment