mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 03:26:59 +03:00
remove TODO comments
This commit is contained in:
committed by
Dainius Dauksevicius
parent
08d27265fc
commit
62b008e693
@@ -40,7 +40,7 @@ addDefaults(config, {
|
||||
windowMs: 900000,
|
||||
max: 20,
|
||||
statusCode: 200,
|
||||
message: "", // TODO TYPESCRIPT whats the msg?
|
||||
message: "Too many views, please try again later",
|
||||
},
|
||||
},
|
||||
userCounterURL: null,
|
||||
|
||||
@@ -76,9 +76,8 @@ function getWeightedRandomChoice(choices: any[], amountOfChoices: number) {
|
||||
let totalWeight = 0;
|
||||
choices = choices.map(choice => {
|
||||
//The 3 makes -2 the minimum votes before being ignored completely
|
||||
//https://www.desmos.com/calculator/c1duhfrmts
|
||||
//this can be changed if this system increases in popularity.
|
||||
const weight = Math.exp((choice.votes + 3)); // TODO TYPESCRIPT what was this 0.85?
|
||||
const weight = Math.exp((choice.votes + 3));
|
||||
totalWeight += weight;
|
||||
|
||||
return {...choice, weight};
|
||||
|
||||
@@ -55,7 +55,6 @@ export async function shadowBanUser(req: Request, res: Response) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO TYPESCRIPT a lof unused code, wtf is happening
|
||||
else if (hashedIP) {
|
||||
//check to see if this user is already shadowbanned
|
||||
// let row = privateDB.prepare('get', "SELECT count(*) as userCount FROM shadowBannedIPs WHERE hashedIP = ?", [hashedIP]);
|
||||
|
||||
@@ -36,7 +36,6 @@ function dispatchEvent(scope: string, data: any): void {
|
||||
let scopes = webhook.scopes || [];
|
||||
if (!scopes.includes(scope.toLowerCase())) return;
|
||||
|
||||
// TODO TYPESCRIPT deprecated
|
||||
request.post(webhookURL, {
|
||||
json: data, headers: {
|
||||
"Authorization": authKey,
|
||||
|
||||
Reference in New Issue
Block a user