UNPKG

paradigm-core

Version:
34 lines (27 loc) 764 B
class TestAPI { constructor(server) { this.server = server } async purgeAll(orgId, appId, pkg) { return await this.server .post(`/api/${process.env.API_VERSION}/purge/all`) .set('organizationid', orgId) .set('applicationid', appId) .send(pkg) } async purgeCdnAll(orgId, appId, pkg) { return await this.server .post(`/api/${process.env.API_VERSION}/purge/cdn/all`) .set('organizationid', orgId) .set('applicationid', appId) .send(pkg) } async purgeCdnUrl(orgId, appId, pkg) { return await this.server .post(`/api/${process.env.API_VERSION}/purge/cdn/url`) .set('organizationid', orgId) .set('applicationid', appId) .send(pkg) } } module.exports = TestAPI