set rebuild to true when renewing

This commit is contained in:
Girish Ramakrishnan
2022-11-29 18:12:51 +01:00
parent 3242d82e94
commit c8698d5090
2 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -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));
+2 -1
View File
@@ -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;