Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
24 lines
614 B
TypeScript
24 lines
614 B
TypeScript
import { runScript } from 'run-script'
|
|
|
|
// Get today's date in Pacific Time (same as the backend uses)
|
|
function getTodayDateString(): string {
|
|
const now = new Date()
|
|
const pacificDate = now.toLocaleDateString('en-CA', {
|
|
timeZone: 'America/Los_Angeles',
|
|
})
|
|
return pacificDate // Returns YYYY-MM-DD format
|
|
}
|
|
|
|
runScript(async ({ pg }) => {
|
|
const todayDate = getTodayDateString()
|
|
|
|
console.log(`Deleting predictle for date: ${todayDate}`)
|
|
|
|
const result = await pg.result(
|
|
`DELETE FROM predictle_daily WHERE date_pt = $1`,
|
|
[todayDate]
|
|
)
|
|
|
|
console.log(`Deleted ${result.rowCount} row(s)`)
|
|
})
|