From 17fb0592823b261c4b82b481a685d8953251331b Mon Sep 17 00:00:00 2001 From: Henry Wang Date: Mon, 20 Aug 2018 04:30:18 +0100 Subject: [PATCH] Improve app store routes (#494) --- routes/appstore/price.js | 2 +- routes/appstore/update.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/appstore/price.js b/routes/appstore/price.js index 07a5c8ac1..c3719be85 100644 --- a/routes/appstore/price.js +++ b/routes/appstore/price.js @@ -40,7 +40,7 @@ module.exports = async (ctx) => { } ctx.state.data = { title, - link: url, + link, item, }; }; diff --git a/routes/appstore/update.js b/routes/appstore/update.js index 9dcf0f430..dadf708d9 100644 --- a/routes/appstore/update.js +++ b/routes/appstore/update.js @@ -5,11 +5,11 @@ const config = require('../../config'); module.exports = async (ctx) => { const id = ctx.params.id; const country = ctx.params.country; - const url = `https://itunes.apple.com/${country}/app/${id}?ls=1&mt=8`; + const url = `https://itunes.apple.com/${country}/app/${id}`; const res = await axios({ method: 'get', - url: url, + url, headers: { 'User-Agent': config.ua, },