diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-03-26 15:34:00 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-26 15:34:00 +0900 |
| commit | 1c67c26bd87aae64fe0f2ef45140e12a78564699 (patch) | |
| tree | 633a3fad1c5841ea20bc39d6b681b455bbdeabf3 /packages/backend/src/queue/processors/db/delete-account.ts | |
| parent | .js (diff) | |
| download | sharkey-1c67c26bd87aae64fe0f2ef45140e12a78564699.tar.gz sharkey-1c67c26bd87aae64fe0f2ef45140e12a78564699.tar.bz2 sharkey-1c67c26bd87aae64fe0f2ef45140e12a78564699.zip | |
refactor: migrate to typeorm 3.0 (#8443)
* wip
* wip
* wip
* Update following.ts
* wip
* wip
* wip
* Update resolve-user.ts
* maxQueryExecutionTime
* wip
* wip
Diffstat (limited to 'packages/backend/src/queue/processors/db/delete-account.ts')
| -rw-r--r-- | packages/backend/src/queue/processors/db/delete-account.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/queue/processors/db/delete-account.ts b/packages/backend/src/queue/processors/db/delete-account.ts index dbc1f16a46..c1657b4be6 100644 --- a/packages/backend/src/queue/processors/db/delete-account.ts +++ b/packages/backend/src/queue/processors/db/delete-account.ts @@ -13,7 +13,7 @@ const logger = queueLogger.createSubLogger('delete-account'); export async function deleteAccount(job: Bull.Job<DbUserDeleteJobData>): Promise<string | void> { logger.info(`Deleting account of ${job.data.user.id} ...`); - const user = await Users.findOne(job.data.user.id); + const user = await Users.findOneBy({ id: job.data.user.id }); if (user == null) { return; } @@ -75,7 +75,7 @@ export async function deleteAccount(job: Bull.Job<DbUserDeleteJobData>): Promise } { // Send email notification - const profile = await UserProfiles.findOneOrFail(user.id); + const profile = await UserProfiles.findOneByOrFail({ userId: user.id }); if (profile.email && profile.emailVerified) { sendEmail(profile.email, 'Account deleted', `Your account has been deleted.`, |