From 338f3f554b6050fd348e30a9e9e4e937cd1b8628 Mon Sep 17 00:00:00 2001 From: Marie JONES Date: Fri, 14 Feb 2020 07:06:05 +0100 Subject: [PATCH] feat(services): add form routes (#280) Signed-off-by: Marie JONES --- src/api/services/form/form.service.js | 5 +++++ src/api/services/form/form.v6.service.js | 9 +++++++++ src/api/services/services.service.js | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 src/api/services/form/form.service.js create mode 100644 src/api/services/form/form.v6.service.js diff --git a/src/api/services/form/form.service.js b/src/api/services/form/form.service.js new file mode 100644 index 00000000..7ab630aa --- /dev/null +++ b/src/api/services/form/form.service.js @@ -0,0 +1,5 @@ +angular.module('ovh-api-services').service('OvhApiServicesForm', ($injector) => ({ + v6() { + return $injector.get('OvhApiServicesFormV6'); + }, +})); diff --git a/src/api/services/form/form.v6.service.js b/src/api/services/form/form.v6.service.js new file mode 100644 index 00000000..ff970a98 --- /dev/null +++ b/src/api/services/form/form.v6.service.js @@ -0,0 +1,9 @@ +angular.module('ovh-api-services').service('OvhApiServicesFormV6', ($resource) => $resource('/services/:serviceId/form/:formName', { + serviceId: '@serviceId', + formName: '@formName', +}, { + answer: { + method: 'POST', + url: '/services/:serviceId/form/:formName/answer', + }, +})); diff --git a/src/api/services/services.service.js b/src/api/services/services.service.js index 970d8c14..07cf3d41 100644 --- a/src/api/services/services.service.js +++ b/src/api/services/services.service.js @@ -5,6 +5,9 @@ angular.module('ovh-api-services').service('OvhApiServices', ($injector) => ({ Detach() { return $injector.get('OvhApiServicesDetach'); }, + Form() { + return $injector.get('OvhApiServicesForm'); + }, v6() { return $injector.get('OvhApiServicesV6'); },