fix(api): fix replaceOrUpdateContent call not matching the required signature

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2024-11-11 17:28:18 -05:00
parent b782522f33
commit 40bb98eb1d
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

View File

@ -1,6 +1,6 @@
import { weirdToNormalChars } from "weird-to-normal-chars";
import { MyStuff } from "@client/types/form/myStuff";
import { apiRoot } from "@server/constants";
import { apiRoot, doNotSelect } from "@server/constants";
import { isLoggedIn } from "@server/middlewareButNotReally";
import { Review } from "@models/stories/review";
import { IUser, User } from "@models/user";
@ -16,7 +16,7 @@ function emsg(arg: string): any {
export default eventHandler(async (ev) => {
isLoggedIn(ev);
const body = await readBody<MyStuff>(ev);
let u = await User.findById(ev.context.currentUser!._id).exec();
let u = await User.findById(ev.context.currentUser!._id).select(doNotSelect).exec();
if (!u) {
throw createError({
statusCode: 500,