mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 15:58:38 +01:00
fix account delete
This commit is contained in:
@@ -7,6 +7,7 @@ import { AiChatModel } from "@schema/ai/AiChatSchema";
|
|||||||
import { LimitNotifyModel } from "@schema/broker/LimitNotifySchema";
|
import { LimitNotifyModel } from "@schema/broker/LimitNotifySchema";
|
||||||
import { SessionModel } from "@schema/metrics/SessionSchema";
|
import { SessionModel } from "@schema/metrics/SessionSchema";
|
||||||
import StripeService from "~/server/services/StripeService";
|
import StripeService from "~/server/services/StripeService";
|
||||||
|
import { UserModel } from "@schema/UserSchema";
|
||||||
|
|
||||||
export default defineEventHandler(async event => {
|
export default defineEventHandler(async event => {
|
||||||
|
|
||||||
@@ -29,6 +30,8 @@ export default defineEventHandler(async event => {
|
|||||||
const notifiesDeletation = await LimitNotifyModel.deleteMany({ project_id });
|
const notifiesDeletation = await LimitNotifyModel.deleteMany({ project_id });
|
||||||
const aiChatsDeletation = await AiChatModel.deleteMany({ project_id });
|
const aiChatsDeletation = await AiChatModel.deleteMany({ project_id });
|
||||||
|
|
||||||
|
const userDeletation = await UserModel.deleteOne({ _id: userData.id });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return { ok: true };
|
return { ok: true };
|
||||||
|
|||||||
Reference in New Issue
Block a user