13 lines
398 B
TypeScript
13 lines
398 B
TypeScript
import type { RequestCreateKP, ResponseCreateKP } from './types';
|
|
import getUrls from '@/config/urls';
|
|
import { withHandleError } from '@/utils/axios';
|
|
import axios from 'axios';
|
|
|
|
const { URL_CRM_CREATEKP } = getUrls();
|
|
|
|
export async function createKP(payload: RequestCreateKP) {
|
|
return withHandleError(
|
|
axios.post<ResponseCreateKP>(URL_CRM_CREATEKP, payload).then(({ data }) => data)
|
|
);
|
|
}
|