mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-12 14:51:32 +08:00

* added more changes to query builder * added types for composite queries * (feat): added edit rules and create rules forms * (feat): added chart preview for alert metric ui * (feat): added threshold in chart, translations in alert form and a few fixes * feat: added a link for alert name in list alerts page and source for each rule update Co-authored-by: Pranshu Chittora <pranshu@signoz.io>
18 lines
398 B
TypeScript
18 lines
398 B
TypeScript
import { ErrorResponse, SuccessResponse } from 'types/api';
|
|
import { PayloadProps, Props } from 'types/api/alerts/save';
|
|
|
|
import create from './create';
|
|
import put from './put';
|
|
|
|
const save = async (
|
|
props: Props,
|
|
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
|
|
if (props.id && props.id > 0) {
|
|
return put({ ...props });
|
|
}
|
|
|
|
return create({ ...props });
|
|
};
|
|
|
|
export default save;
|