mirror of
https://github.com/open-reception/appointment-booking-software.git
synced 2026-08-17 21:25:52 +02:00
Only delete invites on tenant where staff was deleted
This commit is contained in:
@@ -213,9 +213,12 @@ export class StaffService {
|
||||
const deletedInvites = await tx
|
||||
.delete(userInvite)
|
||||
.where(
|
||||
or(
|
||||
eq(userInvite.createdUserId, staffId),
|
||||
eq(userInvite.email, userToDelete[0].email),
|
||||
and(
|
||||
eq(userInvite.tenantId, tenantId),
|
||||
or(
|
||||
eq(userInvite.createdUserId, staffId),
|
||||
eq(userInvite.email, userToDelete[0].email),
|
||||
),
|
||||
),
|
||||
);
|
||||
logger.debug("Deleted user invites", {
|
||||
|
||||
Reference in New Issue
Block a user