Unverified Commit 16d7a6d1 authored by Ivan Gabriele's avatar Ivan Gabriele Committed by GitHub
Browse files

ci: add default cdtn api url in env example (#1094)

parent a3b9eb87
......@@ -20,6 +20,7 @@ APP_SCHEME=http
# ------------------------------------------------
# External endpoints
CDTN_API_URL=https://cdtn-api.fabrique.social.gouv.fr
# CDTN_API_URL=http://localhost:3300
# ------------------------------------------------
......
......@@ -68,7 +68,7 @@ The website should now be available at: http://localhost:3100.
Standalone dev also runs [**ctdn-api**](https://github.com/SocialGouv/cdtn-api) locally:
First, uncomment `CDTN_API_URL=http://localhost:3300` in `.env` file.
First, change `CDTN_API_URL` value to `http://localhost:3300` in `.env` file.
Then run:
......
......@@ -7,7 +7,7 @@ import load from "../load";
jest.mock("../../../libs/cdtnApi");
describe(`sagas/legal-references/load()`, () => {
/** @type {cdtnApi.Article[]} */
/** @type {DilaApi.Article[]} */
const AGREEMENT_DATA = [
{
cid: "KALIARTI123456789012",
......
......@@ -23,7 +23,7 @@ export default function* load({ meta: { category, idcc, query } }) {
if (category === C.LEGAL_REFERENCE_CATEGORY.AGREEMENT) {
const path = `/agreement/articles?agreementIdOrIdcc=${idcc}&query=${query}`;
/** @type {cdtnApi.Article[]} */
/** @type {DilaApi.Article[]} */
const articles = yield cdtnApi.get(path);
response.list = articles.map(article => ({
......@@ -32,7 +32,7 @@ export default function* load({ meta: { category, idcc, query } }) {
}));
} else {
const path = `/code/articles?codeId=LEGITEXT000006072050&query=${query}`;
/** @type {cdtnApi.Article[]} */
/** @type {DilaApi.Article[]} */
const articles = yield cdtnApi.get(path);
response.list = articles.map(article => ({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment