Publish updated WeChat Radar

This commit is contained in:
joeseesun
2026-05-26 09:10:04 +08:00
parent 8abb29e13e
commit de7ec99fed
44 changed files with 2900 additions and 746 deletions
+2 -2
View File
@@ -1,13 +1,13 @@
import { NextResponse } from 'next/server';
import { db } from '@/lib/db';
import { DATA_DIR } from '@/lib/config';
import { existsSync, statSync } from 'node:fs';
import { homedir } from 'node:os';
import { join } from 'node:path';
export const dynamic = 'force-dynamic';
export async function POST() {
const dataDir = process.env.WECHAT_RADAR_DATA_DIR ?? join(homedir(), '.wechat-radar');
const dataDir = DATA_DIR;
const dest = join(dataDir, 'radar-recovered.db');
try {
db().pragma('wal_checkpoint(TRUNCATE)');