From cf13e5373fd591bda66438bdebaff0dfa7cb4a21 Mon Sep 17 00:00:00 2001 From: "Ravindra.Adireddy" Date: Mon, 17 Jun 2019 14:04:41 +0530 Subject: [PATCH] added cloud agreements and PCI auto backup end points --- src/cloud/cloud.v6.service.js | 7 +++++++ ...cloud-project-region-workflow-backup.v6.service.js | 11 +++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/cloud/cloud.v6.service.js b/src/cloud/cloud.v6.service.js index c0542c4d..06ed4e58 100644 --- a/src/cloud/cloud.v6.service.js +++ b/src/cloud/cloud.v6.service.js @@ -37,6 +37,13 @@ angular.module("ovh-api-services").service("OvhApiCloudV6", function ($resource, subsidiaryPrice: { url: "/cloud/subsidiaryPrice", method: "GET" + }, + agreements: { + url: "/cloud/agreements", + method: "GET", + params: { + product: "@product" + } } }); }); diff --git a/src/cloud/project/region/workflow/backup/cloud-project-region-workflow-backup.v6.service.js b/src/cloud/project/region/workflow/backup/cloud-project-region-workflow-backup.v6.service.js index 115c5e05..b1d3c61e 100644 --- a/src/cloud/project/region/workflow/backup/cloud-project-region-workflow-backup.v6.service.js +++ b/src/cloud/project/region/workflow/backup/cloud-project-region-workflow-backup.v6.service.js @@ -1,6 +1,7 @@ angular.module("ovh-api-services").service("OvhApiCloudProjectRegionWorkflowBackupV6", function ($resource, $cacheFactory) { "use strict"; + var cache = $cacheFactory("OvhApiCloudProjectRegionWorkflowBackupV6"); var queryCache = $cacheFactory("OvhApiCloudProjectRegionWorkflowBackupV6Query"); var interceptor = { @@ -10,15 +11,21 @@ angular.module("ovh-api-services").service("OvhApiCloudProjectRegionWorkflowBack } }; - var backup = $resource("/cloud/project/:serviceName/region/:regionName/workflow/backup/:backupId", { + var backup = $resource("/cloud/project/:serviceName/region/:regionName/workflow/backup/:backupWorkflowId", { serviceName: "@serviceName", - regionName: "@regionName" + regionName: "@regionName", + backupWorkflowId: "@backupWorkflowId" }, { query: { method: "GET", cache: queryCache, isArray: true }, + get: { method: "GET", cache: cache }, save: { method: "POST", interceptor: interceptor }, "delete": { method: "DELETE", interceptor: interceptor } }); + backup.resetCache = function () { + cache.removeAll(); + }; + backup.resetQueryCache = function () { queryCache.removeAll(); };