Make function more clear

This commit is contained in:
Jackson Harper 2023-01-11 23:08:30 +08:00
parent ee50b237c6
commit fa866f1d29

View file

@ -191,10 +191,10 @@ const handleEvent = async (data: StorageEvent) => {
await handler(ctx, stream)
if (ctx.countImported <= 1) {
await sendImportFailedEmail(userId)
} else {
if (ctx.countImported > 0) {
await sendImportCompletedEmail(userId, ctx.countImported, ctx.countFailed)
} else {
await sendImportFailedEmail(userId)
}
}
}