Skip to content

Commit 50cda6b

Browse files
committed
fix(utils): changement d'URL de l'API de Docs de LaSuite
1 parent 5fe160d commit 50cda6b

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/js/utils/urls.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function handleURLfromDocsSuiteNumerique(url) {
5757
const documentIdMatch = url.match(/docs\/([a-z0-9-]+)\//);
5858
if (documentIdMatch) {
5959
const documentId = documentIdMatch[1];
60-
return `https://docs.numerique.gouv.fr/api/v1.0/documents/${documentId}/content/?content_format=markdown`;
60+
return `https://docs.numerique.gouv.fr/api/v1.0/documents/${documentId}/formatted-content/?content_format=markdown`;
6161
} else return "";
6262
}
6363

app/script.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/script.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/unit/utils/urls.spec.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ describe("handleURL", () => {
197197
const options = {};
198198
const result = handleURL(url, options);
199199
expect(result).toBe(
200-
"https://docs.numerique.gouv.fr/api/v1.0/documents/7066cdaa-16b4-4bd8-a06b-e1de20ae402d/content/?content_format=markdown",
200+
"https://docs.numerique.gouv.fr/api/v1.0/documents/7066cdaa-16b4-4bd8-a06b-e1de20ae402d/formatted-content/?content_format=markdown",
201201
);
202202
});
203203

0 commit comments

Comments
 (0)