remove TODO comments

This commit is contained in:
Dainius Daukševičius
2020-10-19 21:24:13 +03:00
committed by Dainius Dauksevicius
parent 08d27265fc
commit 62b008e693
4 changed files with 2 additions and 5 deletions

View File

@@ -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,

View File

@@ -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};

View File

@@ -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]);

View File

@@ -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,