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

feat(services): add form routes #280

Merged
merged 1 commit into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/api/services/form/form.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
angular.module('ovh-api-services').service('OvhApiServicesForm', ($injector) => ({
v6() {
return $injector.get('OvhApiServicesFormV6');
},
}));
9 changes: 9 additions & 0 deletions src/api/services/form/form.v6.service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
angular.module('ovh-api-services').service('OvhApiServicesFormV6', ($resource) => $resource('/services/:serviceId/form/:formName', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No cache ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy/paste from parent I guess, not entirely sure it is needed as main usage is for this is to open link from email meaning that a new app is started

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's your usage of it, not all the future usage of it 😱

Copy link
Contributor Author

@marie-j marie-j Feb 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I guess if cache is needed at one point, it can always be added

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😅

serviceId: '@serviceId',
formName: '@formName',
}, {
answer: {
method: 'POST',
url: '/services/:serviceId/form/:formName/answer',
},
}));
3 changes: 3 additions & 0 deletions src/api/services/services.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
},
Expand Down