mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-30 19:07:58 +03:00
style: lint code
This commit is contained in:
@@ -15,7 +15,7 @@ if (require.main === module) {
|
||||
.map((e) => e.preferences.stats)
|
||||
.flat()
|
||||
.filter((e) => e.mode === "folder")
|
||||
.map((e) => (e as ShowcaseStatFolder).folderID) as Array<string>;
|
||||
.map((e) => (e as ShowcaseStatFolder).folderID) as unknown as Array<string>;
|
||||
|
||||
const pertinentFolders = await db.folders.find(
|
||||
{
|
||||
|
||||
@@ -40,14 +40,19 @@ router.get("/", async (req, res) => {
|
||||
if (userID === null) {
|
||||
return res.status(401).json({
|
||||
success: false,
|
||||
description: `You must be authorised as a user to use the requesterHasPlayed option.`
|
||||
description: `You must be authorised as a user to use the requesterHasPlayed option.`,
|
||||
});
|
||||
}
|
||||
|
||||
const playedSongs = (await db["personal-bests"].find({userID, game, playtype}, {projection: {songID: 1}})).map(e => e.songID)
|
||||
const playedSongs = (
|
||||
await db["personal-bests"].find(
|
||||
{ userID, game, playtype },
|
||||
{ projection: { songID: 1 } }
|
||||
)
|
||||
).map((e) => e.songID);
|
||||
|
||||
if (songIDs) {
|
||||
songIDs = songIDs.filter(e => playedSongs.includes(e))
|
||||
songIDs = songIDs.filter((e) => playedSongs.includes(e));
|
||||
} else {
|
||||
songIDs = playedSongs;
|
||||
}
|
||||
@@ -59,6 +64,7 @@ router.get("/", async (req, res) => {
|
||||
let charts = await FindChartsOnPopularity(
|
||||
game,
|
||||
playtype,
|
||||
|
||||
// if empty, we want the set of all songs. Otherwise, constrict input.
|
||||
songIDs,
|
||||
skip,
|
||||
|
||||
Reference in New Issue
Block a user