From 0e5631dcb7c782612f6ed0293bbc9518b72f7854 Mon Sep 17 00:00:00 2001 From: Marie JONES Date: Wed, 30 Oct 2019 10:25:30 +0100 Subject: [PATCH] feat(domain): add zone records (#254) ref: DTRSD-4702 Signed-off-by: Marie JONES --- src/api/domain/domain.service.js | 7 +++++-- src/api/domain/zone/domain-zone.service.js | 8 ++++++++ src/api/domain/zone/domain-zone.v6.service.js | 5 +++++ src/api/domain/zone/record/domain-zone-record.service.js | 5 +++++ .../domain/zone/record/domain-zone-record.v6.service.js | 6 ++++++ 5 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 src/api/domain/zone/domain-zone.service.js create mode 100644 src/api/domain/zone/domain-zone.v6.service.js create mode 100644 src/api/domain/zone/record/domain-zone-record.service.js create mode 100644 src/api/domain/zone/record/domain-zone-record.v6.service.js diff --git a/src/api/domain/domain.service.js b/src/api/domain/domain.service.js index 0b2deaa7..2ae96c5c 100644 --- a/src/api/domain/domain.service.js +++ b/src/api/domain/domain.service.js @@ -8,10 +8,13 @@ angular.module('ovh-api-services').service('OvhApiDomain', ($injector) => ({ Configurations() { return $injector.get('OvhApiDomainConfigurations'); }, + Options() { + return $injector.get('OvhApiDomainOptions'); + }, Rules() { return $injector.get('OvhApiDomainRules'); }, - Options() { - return $injector.get('OvhApiDomainOptions'); + Zone() { + return $injector.get('OvhApiDomainZone'); }, })); diff --git a/src/api/domain/zone/domain-zone.service.js b/src/api/domain/zone/domain-zone.service.js new file mode 100644 index 00000000..9a4bb60e --- /dev/null +++ b/src/api/domain/zone/domain-zone.service.js @@ -0,0 +1,8 @@ +angular.module('ovh-api-services').service('OvhApiDomainZone', ($injector) => ({ + v6() { + return $injector.get('OvhApiDomainZoneV6'); + }, + Record() { + return $injector.get('OvhApiDomainZoneRecord'); + }, +})); diff --git a/src/api/domain/zone/domain-zone.v6.service.js b/src/api/domain/zone/domain-zone.v6.service.js new file mode 100644 index 00000000..27883d5f --- /dev/null +++ b/src/api/domain/zone/domain-zone.v6.service.js @@ -0,0 +1,5 @@ +angular.module('ovh-api-services').service('OvhApiDomainZoneV6', ($resource) => $resource( + '/domain/zone/:zoneName', { + zoneName: '@zoneName', + }, +)); diff --git a/src/api/domain/zone/record/domain-zone-record.service.js b/src/api/domain/zone/record/domain-zone-record.service.js new file mode 100644 index 00000000..c2e9098b --- /dev/null +++ b/src/api/domain/zone/record/domain-zone-record.service.js @@ -0,0 +1,5 @@ +angular.module('ovh-api-services').service('OvhApiDomainZoneRecord', ($injector) => ({ + v6() { + return $injector.get('OvhApiDomainZoneRecordV6'); + }, +})); diff --git a/src/api/domain/zone/record/domain-zone-record.v6.service.js b/src/api/domain/zone/record/domain-zone-record.v6.service.js new file mode 100644 index 00000000..e12934e8 --- /dev/null +++ b/src/api/domain/zone/record/domain-zone-record.v6.service.js @@ -0,0 +1,6 @@ +angular.module('ovh-api-services').service('OvhApiDomainZoneRecordV6', ($resource) => $resource( + '/domain/zone/:zoneName/record/:id', { + zoneName: '@zoneName', + id: '@id', + }, +));