14 lines
416 B
TypeScript
14 lines
416 B
TypeScript
|
|
import type { IDataSource } from "@erp/core/client";
|
||
|
|
|
||
|
|
import type { DeleteSupplierByIdRequestDTO } from "../../../common";
|
||
|
|
|
||
|
|
export type SupplierDeleteInput = DeleteSupplierByIdRequestDTO;
|
||
|
|
|
||
|
|
export async function deleteSupplierById(dataSource: IDataSource, id: string, signal: AbortSignal) {
|
||
|
|
const response = await dataSource.deleteOne<SupplierDeleteInput>("suppliers", id, {
|
||
|
|
signal,
|
||
|
|
});
|
||
|
|
|
||
|
|
return response;
|
||
|
|
}
|