From e65ca281f59b47937f9cf5f1560d1f520efcac20 Mon Sep 17 00:00:00 2001
From: A Farzat <a@farzat.xyz>
Date: Sun, 12 Oct 2025 08:04:10 +0300
Subject: Update the front-end to use PATCH calls

---
 front-end/src/App.jsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'front-end/src/App.jsx')

diff --git a/front-end/src/App.jsx b/front-end/src/App.jsx
index 1bdcdaf..6264e47 100644
--- a/front-end/src/App.jsx
+++ b/front-end/src/App.jsx
@@ -62,10 +62,9 @@ function App() {
   const setViewed = async (subscriptionId, viewedTime) => {
     try {
       const formData = new FormData();
-      formData.append('_id', subscriptionId);
       formData.append('viewed_time', viewedTime);
 
-      await axios.post(`${API_BASE_URL}/set-viewed/`, formData, {
+      await axios.patch(`${API_BASE_URL}/set-viewed/${subscriptionId}`, formData, {
         headers: {
           'Content-Type': 'multipart/form-data',
         },
@@ -80,10 +79,9 @@ function App() {
     try {
       setUpdatingSubscription(true);
       const formData = new FormData();
-      formData.append('_id', subscriptionId);
       formData.append('time_between_fetches', newTime.toString());
 
-      await axios.post(`${API_BASE_URL}/set-time-between-fetches/`, formData, {
+      await axios.patch(`${API_BASE_URL}/set-time-between-fetches/${subscriptionId}`, formData, {
         headers: {
           'Content-Type': 'multipart/form-data',
         },
-- 
cgit v1.2.3-70-g09d2

