From 7900fa2312c2740554afd92136dfdcb08ca82904 Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Fri, 28 Oct 2022 16:02:23 +0200
Subject: [PATCH] test

---
 src/requests/cozy.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/requests/cozy.js b/src/requests/cozy.js
index 6e99ea0..f185888 100644
--- a/src/requests/cozy.js
+++ b/src/requests/cozy.js
@@ -6,6 +6,7 @@ async function saveAccountData(accountId, accountData) {
   log('info', `saveAccountData: ${accountId}`)
 
   let account = await getAccount(accountId)
+  log('info', `saveAccountData account: ${JSON.stringify(account)}`)
 
   account = await updateOrCreate(
     [{ ...account, data: accountData }],
@@ -22,6 +23,7 @@ async function saveAccountData(accountId, accountData) {
 async function getAccount(accountId) {
   log('info', `getAccount: ${accountId}`)
   const accounts = await cozyClient.data.findAll('io.cozy.accounts')
+  log('info', `getAccount data: ${JSON.stringify(accounts)}`)
   return accounts.filter(account =>
     isLocal() ? account._id === accountId : account.account_type === accountId
   )[0]
-- 
GitLab