From 5667039d7fcbb51cfd6a830363b0d574e68ccba7 Mon Sep 17 00:00:00 2001 From: csr4422 Date: Tue, 16 Dec 2025 13:47:07 +0530 Subject: [PATCH] feat: add draft API service methods --- frontend/src/api/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/frontend/src/api/index.js b/frontend/src/api/index.js index 8c3b6b25..3da5dd9c 100644 --- a/frontend/src/api/index.js +++ b/frontend/src/api/index.js @@ -371,6 +371,16 @@ const updateInbox = (id, data) => } }) const deleteInbox = (id) => http.delete(`/api/v1/inboxes/${id}`) +const saveDraft = (uuid, data) => + http.post(`/api/v1/conversations/${uuid}/draft`, data, { + headers: { + 'Content-Type': 'application/json' + } + }) + +const getDraft = (uuid) => http.get(`/api/v1/conversations/${uuid}/draft`) + +const deleteDraft = (uuid) => http.delete(`/api/v1/conversations/${uuid}/draft`) const getCurrentUserViews = () => http.get('/api/v1/views/me') const createView = (data) => http.post('/api/v1/views/me', data, { @@ -536,6 +546,9 @@ export default { getUsersCompact, getEmailNotificationSettings, updateEmailNotificationSettings, + saveDraft, + getDraft, + deleteDraft, getCurrentUserViews, createView, updateView,