Skip to content
Snippets Groups Projects
Commit 87f0875b authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

Merge branch 'feat/US897-adict-v2' into 'master'

feat: update url calls to adict/v2

See merge request !15
parents 56bff496 2d89818f
Branches
Tags
1 merge request!20Update master branch
{
"singleQuote": true,
"semi": false
}
...@@ -100,7 +100,7 @@ async function getData(token, idPCE) { ...@@ -100,7 +100,7 @@ async function getData(token, idPCE) {
redirect: 'follow' redirect: 'follow'
} }
var url = var url =
'https://api.grdf.fr/adict/v1/pce/' + 'https://api.grdf.fr/adict/v2/pce/' +
idPCE + idPCE +
'/donnees_consos_informatives?date_debut=' + '/donnees_consos_informatives?date_debut=' +
startDate + startDate +
......
...@@ -39,7 +39,7 @@ async function onDeleteAccount(accountId) { ...@@ -39,7 +39,7 @@ async function onDeleteAccount(accountId) {
urlencoded.append('grant_type', 'client_credentials') urlencoded.append('grant_type', 'client_credentials')
urlencoded.append('client_id', accountSecret.client_id) urlencoded.append('client_id', accountSecret.client_id)
urlencoded.append('client_secret', accountSecret.client_secret) urlencoded.append('client_secret', accountSecret.client_secret)
urlencoded.append('scope', '/adict/v1') urlencoded.append('scope', '/adict/v2')
var requestOptionsToken = { var requestOptionsToken = {
method: 'POST', method: 'POST',
...@@ -94,7 +94,7 @@ async function onDeleteAccount(accountId) { ...@@ -94,7 +94,7 @@ async function onDeleteAccount(accountId) {
} }
let accessRights = await fetch( let accessRights = await fetch(
'https://api.grdf.fr/adict/v1/droits_acces', 'https://api.grdf.fr/adict/v2/droits_acces',
requestOptions requestOptions
) )
.then(async response => { .then(async response => {
...@@ -133,7 +133,7 @@ async function onDeleteAccount(accountId) { ...@@ -133,7 +133,7 @@ async function onDeleteAccount(accountId) {
redirect: 'follow' redirect: 'follow'
} }
var url = 'https://api.grdf.fr/adict/v1/droit_acces/' + accessRights var url = 'https://api.grdf.fr/adict/v2/droit_acces/' + accessRights
await fetch(url, deleteRequestOptions) await fetch(url, deleteRequestOptions)
.then(async response => { .then(async response => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment