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

fix

parent 5e159cb0
No related branches found
No related tags found
2 merge requests!19Feat/us858 save expiration date,!17fix/US846-onDelete
......@@ -23,17 +23,15 @@ async function getAccount(accountId) {
}
async function getAccountForDelete(accountId, accountRev) {
log('info', `getAccountForDelete: ${accountId}`)
const accounts = await cozyClient.data.findAll('io.cozy.accounts')
log('info', `getAccountForDelete: ${accountId} ${accountRev}`)
// const accounts = await cozyClient.data.findAll('io.cozy.accounts')
const body = await cozyClient.fetchJSON(
'GET',
`/data/io.cozy.accounts/${accountId}?rev=${accountRev}`
)
log('info', `getAccountForDelete: ${body}`)
return accounts.filter(account =>
isLocal() ? account._id === accountId : account.account_type === accountId
)[0]
return body
}
module.exports = { getAccount, saveAccountData, getAccountForDelete }
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