bug fix delete child domain

This commit is contained in:
usmannasir
2025-06-16 18:58:18 +05:00
parent 74117804c2
commit 9024635c7f

View File

@@ -3173,8 +3173,7 @@ app.controller('listWebsites', function ($scope, $http, $window) {
function ListInitialDatas(response) { function ListInitialDatas(response) {
$scope.cyberPanelLoading = true; if (response.data.SSL === 1) {
if (response.data.SSL === 1) {
new PNotify({ new PNotify({
title: 'Success!', title: 'Success!',
text: 'SSL successfully issued.', text: 'SSL successfully issued.',
@@ -6929,6 +6928,7 @@ app.controller('listChildDomainsMain', function ($scope, $http, $timeout) {
text: 'Child Domain successfully deleted.', text: 'Child Domain successfully deleted.',
type: 'success' type: 'success'
}); });
$('#DeleteChild').modal('hide');
$scope.getFurtherWebsitesFromDB(); $scope.getFurtherWebsitesFromDB();
} else { } else {
new PNotify({ new PNotify({
@@ -10456,19 +10456,25 @@ app.controller('listChildDomainsMain', function ($scope, $http, $timeout) {
} }
var DeleteDomain;
$scope.deleteDomainInit = function (childDomainForDeletion) { $scope.deleteDomainInit = function (childDomainForDeletion) {
DeleteDomain = childDomainForDeletion; $scope.DeleteDomain = childDomainForDeletion;
console.log('Domain to delete:', childDomainForDeletion);
}; };
$scope.deleteChildDomain = function () { $scope.deleteChildDomain = function () {
console.log('Deleting domain:', $scope.DeleteDomain);
if (!$scope.DeleteDomain) {
alert('No domain selected for deletion');
return;
}
$scope.cyberPanelLoading = false; $scope.cyberPanelLoading = false;
url = "/websites/submitDomainDeletion"; url = "/websites/submitDomainDeletion";
var data = { var data = {
websiteName: DeleteDomain, websiteName: $scope.DeleteDomain,
DeleteDocRoot: $scope.DeleteDocRoot DeleteDocRoot: $scope.DeleteDocRoot
}; };
console.log('Delete request data:', data);
var config = { var config = {
headers: { headers: {