implement better-auth auth with postgres and route protection
This commit is contained in:
@@ -21,13 +21,7 @@ const STORE_PATH = path.join(DATA_DIR, 'store.json');
|
||||
|
||||
let writeQueue = Promise.resolve();
|
||||
|
||||
function nowIso() {
|
||||
return new Date().toISOString();
|
||||
}
|
||||
|
||||
function createDefaultStore(): DataStore {
|
||||
const now = nowIso();
|
||||
|
||||
return {
|
||||
counters: {
|
||||
watchlist: 0,
|
||||
@@ -39,19 +33,7 @@ function createDefaultStore(): DataStore {
|
||||
holdings: [],
|
||||
filings: [],
|
||||
tasks: [],
|
||||
insights: [
|
||||
{
|
||||
id: 1,
|
||||
user_id: 1,
|
||||
provider: 'local-bootstrap',
|
||||
model: 'zeroclaw',
|
||||
content: [
|
||||
'System initialized in local-first mode.',
|
||||
'Add holdings and sync filings to produce a live AI brief via OpenClaw.'
|
||||
].join('\n'),
|
||||
created_at: now
|
||||
}
|
||||
]
|
||||
insights: []
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user