Skip to content

Commit

Permalink
Merge pull request #14 from ddeighton/update-API-to-v9
Browse files Browse the repository at this point in the history
Updated url to use v9, instead of v8, of the Todoist Sync API.
  • Loading branch information
Ledaryy committed Nov 4, 2022
2 parents ff203d2 + f2bbb1d commit bc3b1bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fetchTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function fetchTasks(

try {
const url =
`https://api.todoist.com/sync/v8/completed/get_all?since=` +
`https://api.todoist.com/sync/v9/completed/get_all?since=` +
timeStartFormattedDate +
`T` +
timeStartFormattedTime +
Expand Down Expand Up @@ -47,7 +47,7 @@ export async function fetchTasks(
if (renderSubtasks) {
const CompletedTasksPromises = completedTasksMetadata.items.map(
async (task: { task_id: number }) => {
const url = `https://api.todoist.com/sync/v8/items/get?item_id=${task.task_id}`;
const url = `https://api.todoist.com/sync/v9/items/get?item_id=${task.task_id}`;
let completedTasks = await fetch(url, {
headers: {
Authorization: `Bearer ${authToken}`,
Expand Down

0 comments on commit bc3b1bf

Please sign in to comment.