Skip to content

Commit

Permalink
Merge pull request #113 from tahmid-saj/dev-general-cleanup-1
Browse files Browse the repository at this point in the history
removing methods
  • Loading branch information
tahmid-saj authored Jun 13, 2024
2 parents 8d2569d + 88c90ac commit 5f0d95d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/utils/api-requests/calories-burned.requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export async function getTrackedCaloriesBurned(userId, email) {
// calories burned operations
export async function postAddActivity(userId, email, trackedDayInfo, activityId) {
try {
console.log(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}/${email}/${process.env.REACT_APP_API_URL_POST_TRACKED_CALORIES_BURNED}`)
const response = await fetch(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}/${email}/${process.env.REACT_APP_API_URL_POST_TRACKED_CALORIES_BURNED}`, {
console.log(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}/${email}`)
const response = await fetch(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}`, {
method: "POST",
headers: {
"Content-Type": "application/json"
Expand All @@ -96,8 +96,8 @@ export async function postAddActivity(userId, email, trackedDayInfo, activityId)

export async function deleteRemoveActivity(userId, email, activityId) {
try {
console.log(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}/${email}/${process.env.REACT_APP_API_URL_DELETE_TRACKED_CALORIES_BURNED}`)
const response = await fetch(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}/${email}/${process.env.REACT_APP_API_URL_DELETE_TRACKED_CALORIES_BURNED}`, {
console.log(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}/${email}`)
const response = await fetch(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}`, {
method: "DELETE",
headers: {
"Content-Type": "text/plain"
Expand All @@ -117,8 +117,8 @@ export async function deleteRemoveActivity(userId, email, activityId) {
// signing out
export async function putTrackedCaloriesBurned(userId, email, trackedCaloriesBurned) {
try {
console.log(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}/${email}/${process.env.REACT_APP_API_URL_PUT_TRACKED_CALORIES_BURNED}`)
const response = await fetch(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}/${email}/${process.env.REACT_APP_API_URL_PUT_TRACKED_CALORIES_BURNED}`, {
console.log(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}/${email}`)
const response = await fetch(`${process.env.REACT_APP_API_URL_TRACKED_CALORIES_BURNED}/${userId}`, {
method: "PUT",
headers: {
"Content-Type": "application/json"
Expand Down
12 changes: 6 additions & 6 deletions src/utils/api-requests/nutrition-tracker.requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ export const getNutritionTrackedDaysSummaryData = async (userId, email) => {
// nutrition tracked days operations
export const postNutritionTrackedDay = async (userId, email, nutritionTrackedDay) => {
try {
console.log(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}/${process.env.REACT_APP_API_URL_POST_NUTRITION_TRACKED_DAY}`);
const response = await fetch(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}/${process.env.REACT_APP_API_URL_POST_NUTRITION_TRACKED_DAY}`, {
console.log(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}`);
const response = await fetch(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}`, {
method: 'POST',
headers: {
"Content-Type": "application/json"
Expand All @@ -50,8 +50,8 @@ export const postNutritionTrackedDay = async (userId, email, nutritionTrackedDay

export const deleteNutritionTrackedDay = async (userId, email, trackedDay) => {
try {
console.log(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}/${process.env.REACT_APP_API_URL_DELETE_NUTRITION_TRACKED_DAY}`)
const response = await fetch(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}/${process.env.REACT_APP_API_URL_DELETE_NUTRITION_TRACKED_DAY}`, {
console.log(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}`)
const response = await fetch(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}`, {
method: "DELETE",
headers: {
"Content-Type": "text/plain"
Expand All @@ -75,8 +75,8 @@ export const putNutritionTrackedDay = async (userId, email, originalNutritionTra
updatedNutritionTrackedDay: updatedNutritionTrackedDay,
}

console.log(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}/${process.env.REACT_APP_API_URL_PUT_NUTRITION_TRACKED_DAY}`);
const response = await fetch(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}/${process.env.REACT_APP_API_URL_PUT_NUTRITION_TRACKED_DAY}`, {
console.log(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}`);
const response = await fetch(`${process.env.REACT_APP_API_URL_NUTRITION_TRACKED_DAYS}/${userId}/${email}`, {
method: 'PUT',
headers: {
"Content-Type": "application/json"
Expand Down

0 comments on commit 5f0d95d

Please sign in to comment.