@grafana/alerting
Version:
Grafana Alerting Library – Build vertical integrations on top of the industry-leading alerting solution
17 lines (14 loc) • 519 B
JavaScript
import { http, HttpResponse } from 'msw';
import { getAPIBaseURLForMocks } from '../../../../../../mocks/util.mjs';
import { GROUP, VERSION } from '../../../const.mjs';
;
function createReceiverHandler(data) {
return http.post(getAPIBaseURLForMocks(GROUP, VERSION, "/receivers"), function handler(info) {
if (typeof data === "function") {
return data(info);
}
return HttpResponse.json(data);
});
}
export { createReceiverHandler };
//# sourceMappingURL=createReceiverHandler.mjs.map