mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-05 18:48:41 +00:00
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:
@@ -1239,7 +1239,6 @@ class Program
|
||||
{
|
||||
newPassword = GenerateRandomPassword(50);
|
||||
}
|
||||
Console.WriteLine(newPassword);
|
||||
if (string.IsNullOrEmpty(uuid) || string.IsNullOrWhiteSpace(uuid))
|
||||
{
|
||||
context.Response.StatusCode = 400;
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace Sharpbin
|
||||
using (var response = await httpClient.SendAsync(request))
|
||||
{
|
||||
var jsonresponse = JObject.Parse(await response.Content.ReadAsStringAsync());
|
||||
Console.WriteLine(jsonresponse["success"]?.ToString());
|
||||
if (jsonresponse["success"]?.ToString().ToLower() == "true")
|
||||
{
|
||||
return true;
|
||||
|
||||
@@ -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}`);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user