admin: fix Create Bucket sending POST /api/s3/buckets twice (#11790)

admin: fix Create Bucket submitting twice

   admin.js and the Buckets page template both bound a submit listener to #createBucketForm, so one click sent POST /api/s3/buckets twice. Keep only the page handler.
This commit is contained in:
joma1022 authored and GitHub committed 2026-10-16 23:47:48 -07:00
1 parent 42ff535511
commit 161310d834
1 file changed
+1 -5
+1 -5
View File
@@ -396,11 +396,7 @@ window.Dashboard = {
// Initialize event handlers
function initializeEventHandlers() {
// S3 Bucket Management
const createBucketForm = document.getElementById('createBucketForm');
if (createBucketForm) {
createBucketForm.addEventListener('submit', handleCreateBucket);
}
// Delete bucket buttons
document.addEventListener('click', function (e) {
if (e.target.closest('.delete-bucket-btn')) {