Merge pull request #1623 from omnivore-app/fix/import-handler-off-by-one

Handle case where import has a single entry
This commit is contained in:
Jackson Harper 2023-01-06 22:31:05 +08:00 committed by GitHub
commit 982bfe586c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,7 +145,7 @@ export const importHandler: EventFunction = async (event, context) => {
}
})
if (countImported < 1) {
if (countImported <= 1) {
await sendImportFailedEmail(userId)
} else {
await sendImportCompletedEmail(userId, countImported, countFailed)