|
|
@ -304,21 +304,29 @@ export class UserService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async deleteUser(where: Prisma.UserWhereUniqueInput): Promise<User> {
|
|
|
|
public async deleteUser(where: Prisma.UserWhereUniqueInput): Promise<User> {
|
|
|
|
|
|
|
|
try {
|
|
|
|
await this.prismaService.access.deleteMany({
|
|
|
|
await this.prismaService.access.deleteMany({
|
|
|
|
where: { OR: [{ granteeUserId: where.id }, { userId: where.id }] }
|
|
|
|
where: { OR: [{ granteeUserId: where.id }, { userId: where.id }] }
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
await this.prismaService.account.deleteMany({
|
|
|
|
await this.prismaService.account.deleteMany({
|
|
|
|
where: { userId: where.id }
|
|
|
|
where: { userId: where.id }
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
await this.prismaService.analytics.delete({
|
|
|
|
await this.prismaService.analytics.delete({
|
|
|
|
where: { userId: where.id }
|
|
|
|
where: { userId: where.id }
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
await this.prismaService.order.deleteMany({
|
|
|
|
await this.prismaService.order.deleteMany({
|
|
|
|
where: { userId: where.id }
|
|
|
|
where: { userId: where.id }
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
} catch {}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
await this.prismaService.settings.delete({
|
|
|
|
await this.prismaService.settings.delete({
|
|
|
|