fix non-format eslint in src/

This commit is contained in:
Michael C
2021-07-12 02:12:22 -04:00
parent 9445a06871
commit c0b1d201ad
66 changed files with 829 additions and 834 deletions

View File

@@ -1,6 +1,6 @@
import {config} from '../config';
import {Logger} from '../utils/logger';
import fetch from 'node-fetch';
import {config} from "../config";
import {Logger} from "../utils/logger";
import fetch from "node-fetch";
function getVoteAuthorRaw(submissionCount: number, isVIP: boolean, isOwnSubmission: boolean): string {
if (isOwnSubmission) {
@@ -38,16 +38,15 @@ function dispatchEvent(scope: string, data: Record<string, unknown>): void {
if (!scopes.includes(scope.toLowerCase())) return;
fetch(webhookURL, {
method: 'POST',
method: "POST",
body: JSON.stringify(data),
headers: {
"Authorization": authKey,
"Event-Type": scope, // Maybe change this in the future?
'Content-Type': 'application/json'
"Content-Type": "application/json"
}
})
.catch(err => {
Logger.warn('Couldn\'t send webhook to ' + webhook.url);
}).catch(err => {
Logger.warn(`Couldn't send webhook to ${webhook.url}`);
Logger.warn(err);
});
}