Remove debug prints and refactor notification function

Removed unnecessary console output in Program.cs and Turnstile.cs to clean up logs and avoid exposing sensitive information. Refactored user.html to replace the `notification` function with `createNotification` for improved notification handling.
This commit is contained in:
whoswhip
2024-09-13 11:54:04 -04:00
parent 6ca6833b42
commit 65ddb4b722
3 changed files with 6 additions and 8 deletions
+6 -6
View File
@@ -133,11 +133,11 @@
date = new Date(date).getTime() / 1000;
let reason = document.getElementById('ban-reason').value;
if (date == null || reason == null) {
notification('Please fill out all fields');
createNotification('Please fill out all fields');
return;
}
if (date < new Date().getTime() / 1000) {
notification('Please select a date in the future');
createNotification('Please select a date in the future');
return;
}
if ('{typeban}' == 'unban') {
@@ -155,9 +155,9 @@
.then(obj => {
const result = JSON.parse(obj);
if (result.message != null) {
notification(`${result.message} for ${reason}`);
createNotification(`${result.message} for ${reason}`);
} else {
notification(`Failed to {typeban} ${result.error}`);
createNotification(`Failed to {typeban} ${result.error}`);
}
})
} else {
@@ -176,9 +176,9 @@
.then(obj => {
const result = JSON.parse(obj);
if (result.message != null) {
notification(`${result.message} for ${reason}`);
createNotification(`${result.message} for ${reason}`);
} else {
notification(`Failed to {typeban} ${result.error}`);
createNotification(`Failed to {typeban} ${result.error}`);
}
})
}