fix method not allowed error in delete require file from list

This commit is contained in:
Do Manh Phuong 2026-03-20 12:31:26 +07:00
parent b7b8431975
commit 24a299b609
2 changed files with 4 additions and 9 deletions

View File

@ -72,18 +72,13 @@ function CommandPage() {
const columns: ColumnDef<CommandRegistry>[] = [
{
accessorKey: "commandName",
header: "Tên lệnh",
header: () => <div className="min-w-[220px] whitespace-normal">Tên lệnh</div>,
size: 100,
cell: ({ getValue, row }) => {
const full = (getValue() as string) || row.original.commandName || "";
return (
<div className="max-w-[100px]">
<Tooltip>
<TooltipTrigger asChild>
<span className="font-semibold truncate block cursor-help">{full}</span>
</TooltipTrigger>
<TooltipContent side="bottom">{full}</TooltipContent>
</Tooltip>
<div className="min-w-[220px] whitespace-normal break-words">
<span className="font-semibold block leading-tight">{full}</span>
</div>
);
},

View File

@ -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;