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:
@@ -612,7 +612,8 @@ export async function getLastLoTWQSLDate(userId) {
|
|||||||
*/
|
*/
|
||||||
export async function deleteQSOs(userId) {
|
export async function deleteQSOs(userId) {
|
||||||
const result = await db.delete(qsos).where(eq(qsos.userId, 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user