From db09c03af1f309e590ac412aafe9c8b0496c47a3 Mon Sep 17 00:00:00 2001 From: Dimitrios Panteleimon Giakatos <36899728+dpgiakatos@users.noreply.github.com> Date: Thu, 23 May 2024 16:43:16 +0900 Subject: [PATCH] Fix old routes (#799) * Fix routes from old site * Increase package name --- package.json | 2 +- src/router/index.js | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index eb14356c..fbffc919 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ihr-website", - "version": "1.3.5", + "version": "1.3.6", "private": true, "type": "module", "scripts": { diff --git a/src/router/index.js b/src/router/index.js index 870ea10c..d3d5e03b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -132,19 +132,25 @@ const router = createRouter({ }, { path: 'networks/:id?', - redirect: { - name: 'network', - query: { - active: 'monitoring' + redirect: to => { + return { + name: 'network', + query: { + ...to.query, + active: 'monitoring' + } } } }, { path: 'countries/:cc?', - redirect: { - name: 'country', - query: { - active: 'monitoring' + redirect: to => { + return { + name: 'country', + query: { + ...to.query, + active: 'monitoring' + } } } }