Skip to content

Commit e982a82

Browse files
committed
Use Authorization header instead of query string
1 parent 93460ad commit e982a82

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

dist/index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,12 @@ const PREMIUM = core.getInput("PREMIUM");
462462

463463
async function main() {
464464
const stats = await axios(
465-
`https://api.todoist.com/sync/v9/completed/get_stats?token=${TODOIST_API_KEY}`
465+
"https://api.todoist.com/sync/v9/completed/get_stats",
466+
{
467+
headers: {
468+
"Authorization": `Bearer ${TODOIST_API_KEY}`,
469+
}
470+
}
466471
);
467472
await updateReadme(stats.data);
468473
}

index.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ const PREMIUM = core.getInput("PREMIUM");
99

1010
async function main() {
1111
const stats = await axios(
12-
`https://api.todoist.com/sync/v9/completed/get_stats?token=${TODOIST_API_KEY}`
12+
"https://api.todoist.com/sync/v9/completed/get_stats",
13+
{
14+
headers: {
15+
"Authorization": `Bearer ${TODOIST_API_KEY}`,
16+
}
17+
}
1318
);
1419
await updateReadme(stats.data);
1520
}

0 commit comments

Comments
 (0)