From b968d1e6f88d8098b42459e5f681e862bcbebbb9 Mon Sep 17 00:00:00 2001 From: Mathis HERRIOT <197931332+0x485254@users.noreply.github.com> Date: Wed, 21 Jan 2026 13:41:52 +0100 Subject: [PATCH] feat(contents): add `update` and `remove` methods to contents service - Introduced `update` method for partial content updates. - Added `remove` method to handle content deletion. --- frontend/src/services/content.service.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/src/services/content.service.ts b/frontend/src/services/content.service.ts index 70d3de4..68499ba 100644 --- a/frontend/src/services/content.service.ts +++ b/frontend/src/services/content.service.ts @@ -66,6 +66,15 @@ export const ContentService = { await api.delete(`/contents/${id}/admin`); }, + async update(id: string, update: Partial): Promise { + const { data } = await api.patch(`/contents/${id}`, update); + return data; + }, + + async remove(id: string): Promise { + await api.delete(`/contents/${id}`); + }, + async updateAdmin(id: string, update: Partial): Promise { const { data } = await api.patch(`/contents/${id}/admin`, update); return data;