mirror of
https://github.com/joeseesun/wechat-radar.git
synced 2026-09-11 16:38:30 +09:00
Initial open source release
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
import { listTopics } from '@/lib/topics';
|
||||
import { todayStr } from '@/lib/range';
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export async function GET(req: NextRequest) {
|
||||
const url = new URL(req.url);
|
||||
const date = url.searchParams.get('date') ?? todayStr();
|
||||
const topics = listTopics(date);
|
||||
return NextResponse.json({ ok: true, date, topics });
|
||||
}
|
||||
Reference in New Issue
Block a user