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 { homedir } from 'node:os';
import { DATA_DIR } from '@/lib/config';
import { join } from 'node:path';
import { existsSync, statSync } from 'node:fs';
export const dynamic = 'force-dynamic';
export async function GET() {
const dataDir = process.env.WECHAT_RADAR_DATA_DIR ?? join(homedir(), '.wechat-radar');
const dataDir = DATA_DIR;
const dbPath = join(dataDir, 'radar.db');
const dbSize = existsSync(dbPath) ? statSync(dbPath).size : 0;
const counts = {