fix(vendors): delete vendors via REST route

This commit is contained in:
Arthur Bassi 2026-06-16 09:11:36 -03:00
parent e4a1435f3c
commit 42a8c752cc

View file

@ -1,5 +1,5 @@
import { API_PATHS } from "@/api/api-paths";
import { apiGet, apiPost, apiPut } from "@/api/api";
import { apiDelete, apiGet, apiPost, apiPut } from "@/api/api";
import { handleApiResponse, handlePaginatedResponse } from "@/api/handle-api-response";
import {
mapVendor,
@ -58,9 +58,7 @@ export const vendorsApi = {
},
delete: async (id: string | number): Promise<void> => {
await apiGet<unknown>(API_PATHS.vendor.deleteVendor, {
searchParams: { id: String(id) },
});
await apiDelete(`${API_PATHS.rest.vendors}/${id}`);
},
getPortalToken: async (id: string | number): Promise<VendorPortalToken | null> => {