fix: return correct count from deleteQSOs function

The db.delete() returns a result object with a 'changes' property
indicating the number of affected rows, not the count directly.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-22 09:22:13 +01:00
parent 8550b91255
commit 6bc0a2f9b2

View File

@@ -612,7 +612,8 @@ export async function getLastLoTWQSLDate(userId) {
*/
export async function deleteQSOs(userId) {
const result = await db.delete(qsos).where(eq(qsos.userId, userId));
return result;
// Drizzle with SQLite/bun:sqlite returns { changes: number } indicating affected rows
return result.changes || 0;
}
/**