Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frontend/src/components/HomeComponents/Tasks/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const fetchTaskwarriorTasks = async ({

const response = await fetch(fullURL, {
method: 'GET',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
'X-User-Email': email,
Expand Down Expand Up @@ -105,6 +106,7 @@ export const addTaskToBackend = async ({

const response = await fetch(`${backendURL}add-task`, {
method: 'POST',
credentials: 'include',
body: JSON.stringify(requestBody),
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -156,6 +158,7 @@ export const editTaskOnBackend = async ({
}) => {
const response = await fetch(`${backendURL}edit-task`, {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
email,
encryptionSecret,
Expand Down Expand Up @@ -213,6 +216,7 @@ export const modifyTaskOnBackend = async ({
}) => {
const response = await fetch(`${backendURL}modify-task`, {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
email,
encryptionSecret,
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/HomeComponents/Tasks/tasks-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const markTaskAsCompleted = async (

const response = await fetch(backendURL, {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
email: email,
encryptionSecret: encryptionSecret,
Expand Down Expand Up @@ -56,6 +57,7 @@ export const bulkMarkTasksAsCompleted = async (

const response = await fetch(backendURL, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
},
Expand Down Expand Up @@ -97,6 +99,7 @@ export const bulkMarkTasksAsDeleted = async (

const response = await fetch(backendURL, {
method: 'POST',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
},
Expand Down Expand Up @@ -138,6 +141,7 @@ export const markTaskAsDeleted = async (

const response = await fetch(backendURL, {
method: 'POST',
credentials: 'include',
body: JSON.stringify({
email: email,
encryptionSecret: encryptionSecret,
Expand Down
Loading