Skip to content

Commit

Permalink
Re-Switch to Ecowatt v4 (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Jun 6, 2024
1 parent f0d3e4f commit 94b85cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/api/ecowatt/ecowatt.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = function EcowattModel(logger, redisClient) {
},
});

const { data } = await axios.get('https://digital.iservices.rte-france.com/open_api/ecowatt/v5/signals', {
const { data } = await axios.get('https://digital.iservices.rte-france.com/open_api/ecowatt/v4/signals', {
headers: {
authorization: `Bearer ${dataToken.access_token}`,
},
Expand Down
8 changes: 4 additions & 4 deletions test/core/api/ecowatt/ecowatt.controller.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('GET /ecowatt/v4/signals', () => {
access_token: 'access_token',
expires_in: 100,
});
nock('https://digital.iservices.rte-france.com').get('/open_api/ecowatt/v5/signals').reply(200, {
nock('https://digital.iservices.rte-france.com').get('/open_api/ecowatt/v4/signals').reply(200, {
data: true,
});
const response = await request(TEST_BACKEND_APP)
Expand Down Expand Up @@ -52,13 +52,13 @@ describe('GET /ecowatt/v4/signals', () => {
access_token: 'access_token',
expires_in: 100,
});
nock('https://digital.iservices.rte-france.com').get('/open_api/ecowatt/v5/signals').reply(429, {
nock('https://digital.iservices.rte-france.com').get('/open_api/ecowatt/v4/signals').reply(429, {
error: 'too many requests',
});
nock('https://digital.iservices.rte-france.com').get('/open_api/ecowatt/v5/signals').reply(429, {
nock('https://digital.iservices.rte-france.com').get('/open_api/ecowatt/v4/signals').reply(429, {
error: 'too many requests',
});
nock('https://digital.iservices.rte-france.com').get('/open_api/ecowatt/v5/signals').reply(200, {
nock('https://digital.iservices.rte-france.com').get('/open_api/ecowatt/v4/signals').reply(200, {
data: true,
});
const response = await request(TEST_BACKEND_APP)
Expand Down

0 comments on commit 94b85cd

Please sign in to comment.