Add eslint rules for dealing with promises

This commit is contained in:
Ajay
2022-09-07 20:01:11 -04:00
parent 0ca134dc8f
commit bd7dfc63ff
15 changed files with 79 additions and 63 deletions

View File

@@ -412,7 +412,7 @@ export async function vote(ip: IPAddress, UUID: SegmentUUID, paramUserID: UserID
// no restrictions on checkDuration
// check duration of all submissions on this video
if (type <= 0) {
checkVideoDuration(UUID);
checkVideoDuration(UUID).catch(Logger.error);
}
try {
@@ -525,7 +525,7 @@ export async function vote(ip: IPAddress, UUID: SegmentUUID, paramUserID: UserID
incrementAmount,
oldIncrementAmount,
finalResponse
});
}).catch(Logger.error);
}
return { status: finalResponse.finalStatus, message: finalResponse.finalMessage ?? undefined };
} catch (err) {