diff --git a/index.js b/index.js index 7b66c00..9d69af5 100644 --- a/index.js +++ b/index.js @@ -8,8 +8,9 @@ const TODOIST_API_KEY = core.getInput("TODOIST_API_KEY"); const PREMIUM = core.getInput("PREMIUM"); async function main() { - const stats = await axios( - `https://api.todoist.com/sync/v8.3/completed/get_stats?token=${TODOIST_API_KEY}` + const stats = await axios.get( + "https://api.todoist.com/sync/v9/completed/get_stats", + { headers: { Authorization: `Bearer ${TODOIST_API_KEY}` } } ); await updateReadme(stats.data); }