mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
14 lines
341 B
TypeScript
14 lines
341 B
TypeScript
|
|
import { AiNewChatModel } from "~/shared/schema/ai/AiNewChatSchema";
|
|
|
|
export default defineEventHandler(async event => {
|
|
|
|
const ctx = await getRequestContext(event, 'pid');
|
|
const { project_id } = ctx;
|
|
|
|
const chat = await AiNewChatModel.updateMany({ project_id }, { deleted: true });
|
|
if (!chat) return;
|
|
|
|
return chat;
|
|
|
|
}); |