fix(api): fix replaceOrUpdateContent
call not matching the required signature
This commit is contained in:
parent
b782522f33
commit
40bb98eb1d
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user