fix: Ensure IntegrationAuthentication is deleted with team
This commit is contained in:
parent
70ec8c551e
commit
ee270abbe9
@ -14,6 +14,7 @@ import {
|
|||||||
User,
|
User,
|
||||||
UserAuthentication,
|
UserAuthentication,
|
||||||
Integration,
|
Integration,
|
||||||
|
IntegrationAuthentication,
|
||||||
SearchQuery,
|
SearchQuery,
|
||||||
Share,
|
Share,
|
||||||
} from "../models";
|
} from "../models";
|
||||||
@ -130,6 +131,12 @@ export default async function teamPermanentDeleter(team: Team) {
|
|||||||
transaction,
|
transaction,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await IntegrationAuthentication.destroy({
|
||||||
|
where: { teamId },
|
||||||
|
force: true,
|
||||||
|
transaction,
|
||||||
|
});
|
||||||
|
|
||||||
await NotificationSetting.destroy({
|
await NotificationSetting.destroy({
|
||||||
where: { teamId },
|
where: { teamId },
|
||||||
force: true,
|
force: true,
|
||||||
|
Reference in New Issue
Block a user