Improve app store routes (#494)

This commit is contained in:
Henry Wang 2018-08-20 04:30:18 +01:00 committed by DIYgod
parent ac91a727d7
commit 17fb059282
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ module.exports = async (ctx) => {
}
ctx.state.data = {
title,
link: url,
link,
item,
};
};

View File

@ -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,
},