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

Commit

Permalink
fix(me.contact): remove apiv7 call
Browse files Browse the repository at this point in the history
Signed-off-by: Cyril Biencourt <[email protected]>
  • Loading branch information
Cyril Biencourt committed Jun 1, 2022
1 parent 4fb694b commit 00d0ea6
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/api/me/contact/me-contact.v7.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,27 @@ angular.module('ovh-api-services').service('OvhApiMeContactV7', ($resource, $cac
const queryCache = $cacheFactory('OvhApiMeContactv7Query');
const otherCache = $cacheFactory('OvhApiMeContactV7');

const userContactResource = apiv7('/me/contact/:contactId', {
const userContactResource = $resource('/me/contact/:contactId', {
contactId: '@contactId',
}, {
query: {
url: '/me/contact',
method: 'GET',
cache: queryCache,
isArray: true,
serviceType: 'apiV7',
serviceType: 'apiv6',
headers: {
'X-Pagination-Mode': 'CachedObjectList-Pages',
'X-Pagination-Size': '5000'
},
transformResponse(response, headers, httpCode) {
if (httpCode === 200) {
return angular.fromJson(response).map(value => ({
value,
}))
}
return response;
}
},
});

Expand Down

0 comments on commit 00d0ea6

Please sign in to comment.