mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +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 => {
|
||||||
|
|
||||||
@@ -28,6 +29,8 @@ export default defineEventHandler(async event => {
|
|||||||
const sessionsDeletation = await SessionModel.deleteMany({ project_id });
|
const sessionsDeletation = await SessionModel.deleteMany({ project_id });
|
||||||
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 });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user