From ba3b66c46d729c21b545a7579dbd15a1fea62e9d Mon Sep 17 00:00:00 2001 From: hoilc Date: Tue, 23 Feb 2021 07:58:00 +0800 Subject: [PATCH] fix(route): dlsite campaign (#6987) --- lib/routes/dlsite/campaign.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/dlsite/campaign.js b/lib/routes/dlsite/campaign.js index cbb85b6c3b..9d4afd03eb 100644 --- a/lib/routes/dlsite/campaign.js +++ b/lib/routes/dlsite/campaign.js @@ -104,18 +104,18 @@ const infos = { }, }; const setUrl = (info) => { - let paramsPath = `${info.url}/=`; + let paramsPath = `${info.url}/=/`; const params = info.params; for (const name in params) { if (Array.isArray(params[name])) { for (const index in params[name]) { - paramsPath += `${name}[${index}]/${params[name][index]}`; + paramsPath += `${name}[${index}]/${params[name][index]}/`; } } else { - paramsPath += `${name}/${params[name]}`; + paramsPath += `${name}/${params[name]}/`; } } - return paramsPath; + return paramsPath.slice(1); }; module.exports = async (ctx) => { @@ -167,7 +167,7 @@ module.exports = async (ctx) => { ctx.state.data = { title: title, - link: link, + link: `${host}/${link}`, description: description, language: 'ja-jp', allowEmpty: true,