From c8698d509054d4c3008a1942973c78ee526bd03a Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 29 Nov 2022 18:12:51 +0100 Subject: [PATCH] set rebuild to true when renewing --- src/js/client.js | 4 ++-- src/views/domains.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/client.js b/src/js/client.js index 9eb3d4113..7d4245f18 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -2695,8 +2695,8 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout }); }; - Client.prototype.renewCerts = function (callback) { - post('/api/v1/cloudron/renew_certs', {}, null, function (error, data, status) { + Client.prototype.renewCerts = function (options, callback) { + post('/api/v1/cloudron/renew_certs', options, null, function (error, data, status) { if (error) return callback(error); if (status !== 202) return callback(new ClientError(status, data)); diff --git a/src/views/domains.js b/src/views/domains.js index 41ffa6a42..4135ba95c 100644 --- a/src/views/domains.js +++ b/src/views/domains.js @@ -493,7 +493,8 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat $scope.renewCerts.message = ''; $scope.renewCerts.errorMessage = ''; - Client.renewCerts(function (error, taskId) { + // always rebuild the nginx configs when triggered via the UI. we assume user is clicking this because something is wrong + Client.renewCerts({ rebuild: true }, function (error, taskId) { if (error) { console.error(error); $scope.renewCerts.errorMessage = error.message;