fix method not allowed error in delete require file from list
This commit is contained in:
parent
b7b8431975
commit
24a299b609
|
|
@ -72,18 +72,13 @@ function CommandPage() {
|
||||||
const columns: ColumnDef<CommandRegistry>[] = [
|
const columns: ColumnDef<CommandRegistry>[] = [
|
||||||
{
|
{
|
||||||
accessorKey: "commandName",
|
accessorKey: "commandName",
|
||||||
header: "Tên lệnh",
|
header: () => <div className="min-w-[220px] whitespace-normal">Tên lệnh</div>,
|
||||||
size: 100,
|
size: 100,
|
||||||
cell: ({ getValue, row }) => {
|
cell: ({ getValue, row }) => {
|
||||||
const full = (getValue() as string) || row.original.commandName || "";
|
const full = (getValue() as string) || row.original.commandName || "";
|
||||||
return (
|
return (
|
||||||
<div className="max-w-[100px]">
|
<div className="min-w-[220px] whitespace-normal break-words">
|
||||||
<Tooltip>
|
<span className="font-semibold block leading-tight">{full}</span>
|
||||||
<TooltipTrigger asChild>
|
|
||||||
<span className="font-semibold truncate block cursor-help">{full}</span>
|
|
||||||
</TooltipTrigger>
|
|
||||||
<TooltipContent side="bottom">{full}</TooltipContent>
|
|
||||||
</Tooltip>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ export async function addRequiredFile(data: any): Promise<{ message: string }> {
|
||||||
* @param fileId - ID file
|
* @param fileId - ID file
|
||||||
*/
|
*/
|
||||||
export async function deleteRequiredFile(fileId: number): Promise<{ message: string }> {
|
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)
|
API_ENDPOINTS.APP_VERSION.DELETE_REQUIRED_FILE(fileId)
|
||||||
);
|
);
|
||||||
return response.data;
|
return response.data;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user