mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-06 22:52:06 +00:00
fix(vendors): delete vendors via REST route
This commit is contained in:
parent
e4a1435f3c
commit
42a8c752cc
1 changed files with 2 additions and 4 deletions
6
src/domain/vendors/api/vendors-api.ts
vendored
6
src/domain/vendors/api/vendors-api.ts
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
import { API_PATHS } from "@/api/api-paths";
|
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 { handleApiResponse, handlePaginatedResponse } from "@/api/handle-api-response";
|
||||||
import {
|
import {
|
||||||
mapVendor,
|
mapVendor,
|
||||||
|
|
@ -58,9 +58,7 @@ export const vendorsApi = {
|
||||||
},
|
},
|
||||||
|
|
||||||
delete: async (id: string | number): Promise<void> => {
|
delete: async (id: string | number): Promise<void> => {
|
||||||
await apiGet<unknown>(API_PATHS.vendor.deleteVendor, {
|
await apiDelete(`${API_PATHS.rest.vendors}/${id}`);
|
||||||
searchParams: { id: String(id) },
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
getPortalToken: async (id: string | number): Promise<VendorPortalToken | null> => {
|
getPortalToken: async (id: string | number): Promise<VendorPortalToken | null> => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue