Skip to content

Commit 5229f5d

Browse files
committed
refactor(backend): remove unnecessary .then
1 parent ff47fef commit 5229f5d

File tree

4 files changed

+10
-18
lines changed

4 files changed

+10
-18
lines changed

packages/backend/src/core/AbuseReportNotificationService.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@ export class AbuseReportNotificationService implements OnApplicationShutdown {
288288
.log(updater, 'createAbuseReportNotificationRecipient', {
289289
recipientId: id,
290290
recipient: created,
291-
})
292-
.then();
291+
});
293292

294293
return created;
295294
}
@@ -327,8 +326,7 @@ export class AbuseReportNotificationService implements OnApplicationShutdown {
327326
recipientId: params.id,
328327
before: beforeEntity,
329328
after: afterEntity,
330-
})
331-
.then();
329+
});
332330

333331
return afterEntity;
334332
}
@@ -349,8 +347,7 @@ export class AbuseReportNotificationService implements OnApplicationShutdown {
349347
.log(updater, 'deleteAbuseReportNotificationRecipient', {
350348
recipientId: id,
351349
recipient: entity,
352-
})
353-
.then();
350+
});
354351
}
355352

356353
/**

packages/backend/src/core/AbuseReportService.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ export class AbuseReportService {
110110
reportId: report.id,
111111
report: report,
112112
resolvedAs: ps.resolvedAs,
113-
})
114-
.then();
113+
});
115114
}
116115

117116
return this.abuseUserReportsRepository.findBy({ id: In(reports.map(it => it.id)) })
@@ -148,8 +147,7 @@ export class AbuseReportService {
148147
.log(moderator, 'forwardAbuseReport', {
149148
reportId: report.id,
150149
report: report,
151-
})
152-
.then();
150+
});
153151
}
154152

155153
@bindThis

packages/backend/src/core/SignupService.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ export class SignupService {
150150
}));
151151
});
152152

153-
this.usersChart.update(account, true).then();
154-
this.userService.notifySystemWebhook(account, 'userCreated').then();
153+
this.usersChart.update(account, true);
154+
this.userService.notifySystemWebhook(account, 'userCreated');
155155

156156
return { account, secret };
157157
}

packages/backend/src/core/SystemWebhookService.ts

+3-6
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ export class SystemWebhookService implements OnApplicationShutdown {
101101
.log(updater, 'createSystemWebhook', {
102102
systemWebhookId: webhook.id,
103103
webhook: webhook,
104-
})
105-
.then();
104+
});
106105

107106
return webhook;
108107
}
@@ -139,8 +138,7 @@ export class SystemWebhookService implements OnApplicationShutdown {
139138
systemWebhookId: beforeEntity.id,
140139
before: beforeEntity,
141140
after: afterEntity,
142-
})
143-
.then();
141+
});
144142

145143
return afterEntity;
146144
}
@@ -158,8 +156,7 @@ export class SystemWebhookService implements OnApplicationShutdown {
158156
.log(updater, 'deleteSystemWebhook', {
159157
systemWebhookId: webhook.id,
160158
webhook,
161-
})
162-
.then();
159+
});
163160
}
164161

165162
/**

0 commit comments

Comments
 (0)