From 19424266ae6fc7feba061b9ae5d975ca2aaeb6b3 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Sun, 10 Nov 2024 11:21:23 +0200 Subject: [PATCH] Change fingerprint of a function remove --- src/lib/entities.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/entities.ts b/src/lib/entities.ts index d799bc8..5a89471 100644 --- a/src/lib/entities.ts +++ b/src/lib/entities.ts @@ -125,7 +125,7 @@ export async function update(groupName: string, id: number, data: T, session? } } -export async function remove(groupName: string, id: number, session?: string): Promise { +export async function remove(groupName: string, id: number, session?: string): Promise { const url = `${BASE_API_URL}/${groupName}/delete/${id}` const defaultHeaders = { 'Content-Type': 'application/json', @@ -145,7 +145,7 @@ export async function remove(groupName: string, id: number, session?: string) if (!response.ok) { throw new Error(`Failed to delete ${groupName}: ${response.statusText}`); } - return await response.json() as T; + return await response.json() as Message; } catch (err) { const error = err as Error return { message: error.message };