UNPKG

genezio

Version:

Command line utility to interact with Genezio infrastructure.

15 lines (14 loc) 589 B
import sendRequest from "../utils/requests.js"; // This request will start all the crons jobs sent in the request body // and will stop/delete all the crons that are not in the request body // If the request body is empty, it will stop/delete all the crons export async function syncCrons(request) { const { projectName, stageName, crons } = request; const data = JSON.stringify({ projectName: projectName, stageName: stageName, crons: crons, }); const syncCronsResponse = (await sendRequest("POST", `crons`, data)); return syncCronsResponse; }