mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-10 08:18:12 +03:00
style: lint
This commit is contained in:
@@ -167,11 +167,7 @@ export async function ValidateCaptcha(
|
||||
return gcr.success;
|
||||
}
|
||||
|
||||
export function MountAuthCookie(
|
||||
req: Express.Request,
|
||||
user: UserDocument,
|
||||
settings: UserSettings
|
||||
) {
|
||||
export function MountAuthCookie(req: Express.Request, user: UserDocument, settings: UserSettings) {
|
||||
req.session.tachi = {
|
||||
user,
|
||||
settings,
|
||||
|
||||
@@ -32,7 +32,7 @@ router.get("/", async (req, res) => {
|
||||
|
||||
const userID = req[SYMBOL_TACHI_API_AUTH].userID;
|
||||
|
||||
let filter: FilterQuery<FolderDocument & UserDocument & SongDocument> = {};
|
||||
let filter: FilterQuery<FolderDocument & SongDocument & UserDocument> = {};
|
||||
let relevantGames: Array<Game> = TachiConfig.GAMES;
|
||||
|
||||
if (userID !== null) {
|
||||
|
||||
@@ -3,12 +3,7 @@ import deepmerge from "deepmerge";
|
||||
import db from "external/mongo/db";
|
||||
import t from "tap";
|
||||
import ResetDBState from "test-utils/resets";
|
||||
import type {
|
||||
ChartDocument,
|
||||
PBScoreDocument,
|
||||
UserDocument,
|
||||
ScoreDocument,
|
||||
} from "tachi-common";
|
||||
import type { ChartDocument, PBScoreDocument, UserDocument, ScoreDocument } from "tachi-common";
|
||||
|
||||
const mockScorePB: PBScoreDocument<"usc:Controller" | "usc:Keyboard"> = {
|
||||
chartID: "USC_CHART_ID",
|
||||
|
||||
@@ -41,9 +41,7 @@ export async function GetUsernameFromUserID(userID: integer): Promise<string> {
|
||||
/**
|
||||
* Gets a user based on their username case-insensitively.
|
||||
*/
|
||||
export function GetUserCaseInsensitive(
|
||||
username: string
|
||||
): Promise<FindOneResult<UserDocument>> {
|
||||
export function GetUserCaseInsensitive(username: string): Promise<FindOneResult<UserDocument>> {
|
||||
return db.users.findOne({
|
||||
usernameLowercase: username.toLowerCase(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user