Revert "Fix RSS time filters and add draggable grid layout"
This reverts commit 4ee365cfc0.
This commit is contained in:
@@ -4,13 +4,6 @@ import Parser from 'rss-parser';
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
function normalizeDate(item: { isoDate?: string; pubDate?: string }): string | null {
|
||||
const raw = item.isoDate || item.pubDate;
|
||||
if (!raw) return null;
|
||||
const d = new Date(raw);
|
||||
return isNaN(d.getTime()) ? null : d.toISOString();
|
||||
}
|
||||
|
||||
export async function GET() {
|
||||
const db = await getDb();
|
||||
const feeds = await db.all(`
|
||||
@@ -63,7 +56,7 @@ export async function POST(req: NextRequest) {
|
||||
feedId,
|
||||
item.title,
|
||||
item.link,
|
||||
normalizeDate(item),
|
||||
item.pubDate || item.isoDate || null,
|
||||
item.creator || item.author || null,
|
||||
(item.contentSnippet || item.content || '').substring(0, 500) || null
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@ export async function GET(req: NextRequest) {
|
||||
}
|
||||
if (since) {
|
||||
const sinceMap: Record<string, string> = {
|
||||
'12h': '-12 hours',
|
||||
'1h': '-1 hours',
|
||||
'24h': '-24 hours',
|
||||
'7d': '-7 days',
|
||||
'30d': '-30 days',
|
||||
|
||||
Reference in New Issue
Block a user