mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
13 lines
340 B
TypeScript
13 lines
340 B
TypeScript
|
|
import { AiChatModel } from "@schema/ai/AiChatSchema";
|
|
|
|
export default defineEventHandler(async event => {
|
|
|
|
const data = await getRequestDataOld(event);
|
|
if (!data) return;
|
|
|
|
const { project_id } = data;
|
|
|
|
const result = await AiChatModel.updateMany({ project_id }, { deleted: true });
|
|
return result.modifiedCount > 0;
|
|
}); |