From efa5e9d546759be92e7ff1c0bf3b69656e2cd318 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Fri, 18 Apr 2025 20:14:05 +0200 Subject: [PATCH] fix typo --- src/controllers/api/addIgnoredUserController.ts | 8 ++++---- src/controllers/api/removeIgnoredUserController.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/controllers/api/addIgnoredUserController.ts b/src/controllers/api/addIgnoredUserController.ts index ff004c83..99b38972 100644 --- a/src/controllers/api/addIgnoredUserController.ts +++ b/src/controllers/api/addIgnoredUserController.ts @@ -8,15 +8,15 @@ import { RequestHandler } from "express"; export const addIgnoredUserController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const data = getJSONfromString(String(req.body)); - const ignoreeAcount = await Account.findOne( + const ignoreeAccount = await Account.findOne( { DisplayName: data.playerName.substring(0, data.playerName.length - 1) }, "_id" ); - if (ignoreeAcount) { - await Ignore.create({ ignorer: accountId, ignoree: ignoreeAcount._id }); + if (ignoreeAccount) { + await Ignore.create({ ignorer: accountId, ignoree: ignoreeAccount._id }); res.json({ Ignored: { - _id: toOid(ignoreeAcount._id), + _id: toOid(ignoreeAccount._id), DisplayName: data.playerName } satisfies IFriendInfo }); diff --git a/src/controllers/api/removeIgnoredUserController.ts b/src/controllers/api/removeIgnoredUserController.ts index ec539cf9..73613ce6 100644 --- a/src/controllers/api/removeIgnoredUserController.ts +++ b/src/controllers/api/removeIgnoredUserController.ts @@ -6,12 +6,12 @@ import { RequestHandler } from "express"; export const removeIgnoredUserController: RequestHandler = async (req, res) => { const accountId = await getAccountForRequest(req); const data = getJSONfromString(String(req.body)); - const ignoreeAcount = await Account.findOne( + const ignoreeAccount = await Account.findOne( { DisplayName: data.playerName.substring(0, data.playerName.length - 1) }, "_id" ); - if (ignoreeAcount) { - await Ignore.deleteOne({ ignorer: accountId, ignoree: ignoreeAcount._id }); + if (ignoreeAccount) { + await Ignore.deleteOne({ ignorer: accountId, ignoree: ignoreeAccount._id }); } res.end(); };