Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleface committed May 16, 2024
1 parent 9e1b57a commit 68261fb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console,no-unreachable */
import { ContentScript } from 'cozy-clisk/dist/contentscript'
import Minilog from '@cozy/minilog'
const log = Minilog('ContentScript')
Expand Down Expand Up @@ -101,6 +102,7 @@ class TemplateContentScript extends ContentScript {

async fetch(context) {
this.log('fetch starts')
throw new Error('fetch test normal error')
if (this.store.userCredentials) {
await this.saveCredentials(this.store.userCredentials)
}
Expand Down Expand Up @@ -293,6 +295,7 @@ class TemplateContentScript extends ContentScript {
'https://api.alan.com',
'token'
)
console.log('TOKEN', JSON.stringify(token, null, 2))
const documentsUrl =
'https://api.alan.com/api/users/${beneficiaryId}?expand=visible_insurance_documents,address,beneficiaries,beneficiaries.insurance_profile.user,beneficiaries.insurance_profile.latest_tp_card'
const jsonDocuments = await this.fetchAlanApi(documentsUrl, token.value)
Expand Down

0 comments on commit 68261fb

Please sign in to comment.