Skip to content

Commit

Permalink
Update mock route
Browse files Browse the repository at this point in the history
  • Loading branch information
timvanoostrom committed Dec 18, 2024
1 parent 84f4e5f commit 0483c97
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions mocks/routes/cms.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const settings = require('../settings');
const loadFixtureAndReplaceBaseUrl = require('../loadFixtureAndReplaceBaseUrl');
const settings = require('../settings');

const ALLE_RESPONSE = loadFixtureAndReplaceBaseUrl(
'cms-maintenance-notifications-alle.json'
Expand Down Expand Up @@ -65,10 +65,17 @@ module.exports = [
variants: [
{
id: 'standard',
type: 'json',
type: 'middleware',
options: {
status: 200,
body: PRODUCTEN_OP_MA,
middleware: (req, res, next, core) => {
const { articleslug } = req.params;
if (articleslug === 'overzicht-producten-ondernemers') {
const productenOndernemer = structuredClone(PRODUCTEN_OP_MA);
productenOndernemer.applicatie.inhoud.inleiding = `<p><strong>Mock content voor BEDRIJVEN</strong></p>`;
return res.send(productenOndernemer);
}
return res.send(PRODUCTEN_OP_MA);
},
},
},
],
Expand Down

0 comments on commit 0483c97

Please sign in to comment.