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

feat: update url calls to adict/v2

parent 207dcb4f
No related branches found
No related tags found
1 merge request!15feat: update url calls to adict/v2
{
"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