Enhancement/cal 708 delete account (#1403)
* --WIP * --WIP * --WIP * added prisma migration and delete cascade for user * stripe customer removal and other --wip * --wip * added stripe user delete * removed log remnants * fixed signout import * cleanup * Changes requested * fixed common-json apostrophe * Simplifies account deletion logic and add e2e tests * Cleanup Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Omar López <[email protected]>
This commit is contained in:
12 files changed
+235
-34
No files matched your search
@@ -102,6 +102,19 @@ const loggedInViewerRouter = createProtectedRouter()
|
||||
return me;
|
||||
},
|
||||
})
|
||||
.mutation("deleteMe", {
|
||||
async resolve({ ctx }) {
|
||||
// Remove me from Stripe
|
||||
|
||||
// Remove my account
|
||||
await ctx.prisma.user.delete({
|
||||
where: {
|
||||
id: ctx.user.id,
|
||||
},
|
||||
});
|
||||
return;
|
||||
},
|
||||
})
|
||||
.mutation("away", {
|
||||
input: z.object({
|
||||
away: z.boolean(),
|
||||
|
||||
Reference in new issue
Block a user