diff --git a/packages/manager/apps/web/client/app/hosting/ssl/hosting-ssl.service.js b/packages/manager/apps/web/client/app/hosting/ssl/hosting-ssl.service.js index 796f278f4350..e890a427d222 100644 --- a/packages/manager/apps/web/client/app/hosting/ssl/hosting-ssl.service.js +++ b/packages/manager/apps/web/client/app/hosting/ssl/hosting-ssl.service.js @@ -5,8 +5,14 @@ import isString from 'lodash/isString'; angular.module('services').service( 'hostingSSLCertificate', class HostingSSLCertificate { - constructor($rootScope, hostingSSLCertificateType, OvhApiHostingWebSsl) { + constructor( + $rootScope, + $http, + hostingSSLCertificateType, + OvhApiHostingWebSsl, + ) { this.$rootScope = $rootScope; + this.$http = $http; this.hostingSSLCertificateType = hostingSSLCertificateType; this.OvhApiHostingWebSsl = OvhApiHostingWebSsl; @@ -34,8 +40,7 @@ angular.module('services').service( } regeneratingCertificate(serviceName) { - return this.OvhApiHostingWebSsl.v6().regenerate({ serviceName }, {}) - .$promise; + return this.$http.post(`/hosting/web/${serviceName}/ssl/regenerate`); } deletingCertificate(serviceName) {