From 24a299b609437157810cea99ac4efc28bbaf1c19 Mon Sep 17 00:00:00 2001 From: phuongdm Date: Fri, 20 Mar 2026 12:31:26 +0700 Subject: [PATCH] fix method not allowed error in delete require file from list --- src/routes/_auth/commands/index.tsx | 11 +++-------- src/services/app-version.service.ts | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/routes/_auth/commands/index.tsx b/src/routes/_auth/commands/index.tsx index 09f91a7..86950e6 100644 --- a/src/routes/_auth/commands/index.tsx +++ b/src/routes/_auth/commands/index.tsx @@ -72,18 +72,13 @@ function CommandPage() { const columns: ColumnDef[] = [ { accessorKey: "commandName", - header: "Tên lệnh", + header: () =>
Tên lệnh
, size: 100, cell: ({ getValue, row }) => { const full = (getValue() as string) || row.original.commandName || ""; return ( -
- - - {full} - - {full} - +
+ {full}
); }, diff --git a/src/services/app-version.service.ts b/src/services/app-version.service.ts index 5677c32..a8b936a 100644 --- a/src/services/app-version.service.ts +++ b/src/services/app-version.service.ts @@ -111,7 +111,7 @@ export async function addRequiredFile(data: any): Promise<{ message: string }> { * @param fileId - ID file */ export async function deleteRequiredFile(fileId: number): Promise<{ message: string }> { - const response = await axios.delete( + const response = await axios.post( API_ENDPOINTS.APP_VERSION.DELETE_REQUIRED_FILE(fileId) ); return response.data;