forked from jsnbuchanan/crowd-funder-for-time-pwa
fix log cleanup check to actually pay attention to limit
This commit is contained in:
@@ -150,6 +150,7 @@ export async function logToDb(message: string): Promise<void> {
|
|||||||
await platform.dbExec("DELETE FROM logs WHERE date < ?", [
|
await platform.dbExec("DELETE FROM logs WHERE date < ?", [
|
||||||
sevenDaysAgo.toDateString(),
|
sevenDaysAgo.toDateString(),
|
||||||
]);
|
]);
|
||||||
|
lastCleanupDate = todayKey;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// Log to console as fallback
|
// Log to console as fallback
|
||||||
|
|||||||
Reference in New Issue
Block a user