fix typo
All checks were successful
Build / build (push) Successful in 45s
Build / build (pull_request) Successful in 1m29s

This commit is contained in:
Sainan 2025-04-18 20:14:05 +02:00
parent ea0aa2c40d
commit efa5e9d546
2 changed files with 7 additions and 7 deletions

View File

@ -8,15 +8,15 @@ import { RequestHandler } from "express";
export const addIgnoredUserController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req);
const data = getJSONfromString<IAddIgnoredUserRequest>(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
});

View File

@ -6,12 +6,12 @@ import { RequestHandler } from "express";
export const removeIgnoredUserController: RequestHandler = async (req, res) => {
const accountId = await getAccountForRequest(req);
const data = getJSONfromString<IRemoveIgnoredUserRequest>(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();
};