perf: completion chatId
This commit is contained in:
@@ -6,13 +6,13 @@ import { authUser } from '@/service/utils/auth';
|
||||
/* 获取历史记录 */
|
||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
try {
|
||||
const { id } = req.query;
|
||||
const { chatId } = req.query;
|
||||
const { userId } = await authUser({ req, authToken: true });
|
||||
|
||||
await connectToDatabase();
|
||||
|
||||
await Chat.findOneAndRemove({
|
||||
_id: id,
|
||||
chatId,
|
||||
userId
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user