Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
feat(hosting.web): added hosting email option end points (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
radireddy authored and marie-j committed Dec 10, 2019
1 parent 68b60b4 commit 31da74f
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
angular.module('ovh-api-services').service('OvhApiHostingWebEmailOption', ($injector) => ({
v6() {
return $injector.get('OvhApiHostingWebEmailOptionV6');
},
}));
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
angular.module('ovh-api-services').service('OvhApiHostingWebEmailOptionV6', ($resource, $cacheFactory) => {
const cache = $cacheFactory('OvhApiHostingWebEmailOptionv6Cache');
const queryCache = $cacheFactory('OvhApiHostingWebEmailOptionv6CacheQuery');

const resource = $resource('/hosting/web/:serviceName/emailOption/:id', {
serviceName: '@serviceName',
id: '@id',
}, {
query: {
method: 'GET',
cache: queryCache,
isArray: true,
},
get: {
method: 'GET',
cache,
},
serviceInfo: {
method: 'GET',
url: '/hosting/web/:serviceName/emailOption/:id/serviceInfos',
cache,
}
});

resource.resetCache = function () {
cache.removeAll();
};

resource.resetQueryCache = function () {
queryCache.removeAll();
};

return resource;
});
3 changes: 3 additions & 0 deletions src/api/hosting/web/web.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ angular.module('ovh-api-services').service('OvhApiHostingWeb', ($injector) => ({
Ssl() {
return $injector.get('OvhApiHostingWebSsl');
},
EmailOption() {
return $injector.get('OvhApiHostingWebEmailOption');
},
v6() {
return $injector.get('OvhApiHostingWebV6');
},
Expand Down

0 comments on commit 31da74f

Please sign in to comment.