Skip to content

Commit 88a08a4

Browse files
committed
fix soundcloud
1 parent debe39b commit 88a08a4

File tree

4 files changed

+518
-344
lines changed

4 files changed

+518
-344
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"version": "1.0.0",
44
"description": "",
55
"main": "src/index.ts",
6-
"type": "module",
76
"scripts": {
87
"start": "nodemon src/index.ts",
98
"format": "pretty-quick"
@@ -19,10 +18,11 @@
1918
"node-fetch": "^2.6.0"
2019
},
2120
"devDependencies": {
22-
"nodemon": "^2.0.2",
21+
"@types/node-fetch": "^2.5.12",
22+
"nodemon": "^2.0.12",
2323
"prettier": "^1.19.1",
2424
"pretty-quick": "^2.0.1",
25-
"ts-node": "^8.5.4",
26-
"typescript": "^3.7.4"
25+
"ts-node": "^10.1.0",
26+
"typescript": "^4.3.5"
2727
}
2828
}

src/connectors/code-stats.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ const getTime = async () => {
5151
`${baseUrl}092bac11-3129-45ed-91f8-c1770edfefe6.json`
5252
);
5353
const seconds: number = response.data.reduce(
54-
(acc, cur) => acc + cur.grand_total.total_seconds,
54+
(acc: number, cur: any) => acc + cur.grand_total.total_seconds,
5555
0
5656
);
5757
return {
5858
time: convert(seconds),
5959
graph: response.data
60-
.map(i => ({
60+
.map((i: any) => ({
6161
date: i.range.date,
6262
time: i.grand_total.digital,
6363
value: i.grand_total.total_seconds
@@ -70,7 +70,7 @@ const getLanguages = async () => {
7070
const response = await get(
7171
`${baseUrl}e13bf9c6-a046-4728-acde-cddb46881a04.json`
7272
);
73-
return response.data.filter(i => i.name !== "Other").splice(0, 3);
73+
return response.data.filter((i: any) => i.name !== "Other").splice(0, 3);
7474
};
7575

7676
const CodeStats = {

src/connectors/soundcloud.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const soundCloudTypeDefs = gql`
8282

8383
export const soundCloudConnector = async () => {
8484
const response = await get(
85-
`https://api.soundcloud.com/users/johnsylvain/playlists?client_id=${process.env.SOUNDCLOUD_API_KEY}`
85+
`https://api.soundcloud.com/users/147843669/playlists?client_id=${process.env.SOUNDCLOUD_API_KEY}`
8686
);
8787

8888
return response;

0 commit comments

Comments
 (0)