From 080373a5587a3aa9d3c8d86f6164cc76afe690bc Mon Sep 17 00:00:00 2001 From: lucas-chaigne <89460513+lucas-chaigne@users.noreply.github.com> Date: Fri, 11 Aug 2023 15:39:43 +0200 Subject: [PATCH] fix(hosting.ssl): do not send empty body to apiv6 (#9691) ref: WEB-15392 Signed-off-by: Lucas Chaigne --- .../web/client/app/hosting/ssl/hosting-ssl.service.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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) {