Skip to content

Commit

Permalink
fix(data-dragon): corrected version api url.
Browse files Browse the repository at this point in the history
  • Loading branch information
cangzhang committed May 12, 2020
1 parent 2b8a397 commit c0c93bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "champ-r",
"version": "0.9.10",
"version": "0.9.11",
"license": "MIT",
"description": "Get champion items for lol, Windows only.",
"productName": "ChampR",
Expand Down
2 changes: 1 addition & 1 deletion src/service/ddragon.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const ChampionNames = [
const DDragonCDNUrl = 'https://ddragon.leagueoflegends.com/cdn';

const getLolVer = async () => {
const resp = await http.get(`${DDragonCDNUrl}/api/versions.json`);
const resp = await http.get(`https://ddragon.leagueoflegends.com/api/versions.json`);
return resp[0];
};

Expand Down
5 changes: 3 additions & 2 deletions src/service/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ export const requestHtml = async (url, setCancel, isAjax = true) => {
}
};

export const getUpgradeableCompletedItems = ({ data }) => {
export const getUpgradeableCompletedItems = (param) => {
const data = param.data || param;
const result = Object.values(data)
.filter((i) => i.requiredAlly)
.reduce((dataSet, item) => {
const { from } = item;
from.forEach((j) => dataSet.add(j));
(from || []).forEach((j) => dataSet.add(j));
return dataSet;
}, new Set());

Expand Down

0 comments on commit c0c93bb

Please sign in to comment.