No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rollback.js 728B

12345678910111213141516171819202122
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.rollbackTemplate = void 0;
  4. const api_1 = require("../api");
  5. const apiv2_1 = require("../apiv2");
  6. const apiClient = new apiv2_1.Client({
  7. urlPrefix: api_1.remoteConfigApiOrigin,
  8. apiVersion: "v1",
  9. });
  10. const TIMEOUT = 30000;
  11. async function rollbackTemplate(projectId, versionNumber) {
  12. const params = new URLSearchParams();
  13. params.set("versionNumber", `${versionNumber}`);
  14. const res = await apiClient.request({
  15. method: "POST",
  16. path: `/projects/${projectId}/remoteConfig:rollback`,
  17. queryParams: params,
  18. timeout: TIMEOUT,
  19. });
  20. return res.body;
  21. }
  22. exports.rollbackTemplate = rollbackTemplate;