ahmadshaheer ef3a9adb48 Revert "fix: add v4 to the new alert payload (#6090)"
This reverts commit 5651d694854cd77964b9225af7aecb420c9c1fb8.
2024-10-28 11:52:38 +05:30

21 lines
459 B
TypeScript

import axios from 'api';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { PayloadProps, Props } from 'types/api/alerts/create';
const create = async (
props: Props,
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
const response = await axios.post('/rules', {
...props.data,
});
return {
statusCode: 200,
error: null,
message: response.data.status,
payload: response.data.data,
};
};
export default create;