@cllbk/ghl
Version:
A public Node.js compatible SDK for working with HighLevel's (GHL's) Version 2 API.
28 lines • 955 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const requestUtils_1 = require("../../../contexts/requestUtils");
const baseUrl = "https://services.leadconnectorhq.com/payments/custom-provider/provider";
const del = async (locationId, authToken) => {
const deleteEvent = async () => {
const URL = `${baseUrl}?` + new URLSearchParams({ locationId });
const response = await fetch(URL, {
method: "DELETE",
headers: {
Accept: "application/json",
Version: "2021-07-28",
Authorization: `Bearer ${authToken}`,
},
});
const data = await response.json();
return data;
};
try {
return await (0, requestUtils_1.withExponentialBackoff)(deleteEvent);
}
catch (error) {
console.error(error);
return null;
}
};
exports.default = del;
//# sourceMappingURL=delete.js.map