Made some changes to the mock-api

This commit is contained in:
Erik Tiekstra
2021-08-20 07:57:27 +02:00
parent fae7d9ad8c
commit 1e2d925d27
4 changed files with 12 additions and 16 deletions

View File

@@ -61,7 +61,7 @@ router.render = (req, res) => {
let data = res.locals.data;
const employeeRegex = /(?:\/users\/)(.*)/;
const isEmployeePath = employeeRegex.exec(pathname);
const deltagareRegex = /(?:\/deltagare\/)(?:\d\/)(contact|driverlicense|educationlevels\/highest|educations|translator|work\/disabilities|work\/languages|work\/experiences)/g;
const deltagareRegex = /(?:\/deltagare\/)(?:\d*\/)(contact|driverlicense|educationlevels\/highest|educations|translator|work\/disabilities|work\/languages|work\/experiences)/g;
const isDeltagarePath = deltagareRegex.exec(pathname);
const avropRegex = /(?:\/avrop\/(?:tjanster|utforandeverksamheter|kommuner|\d))|(?:\/deltagare\/\d\/(avrop))/g;
const isAvropPath = avropRegex.exec(pathname);