feat(mission-control): restore MC tabs - temple, office, memory, claude, pdf-viewer, resume, resume-upload, temple-3d, demos
Also added: - Memory API endpoints - Briefs API endpoints - AnveVoice stats API - Claude spawn API - TTS proxy - Cleopatra voice widget - api-auth middleware
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
export async function GET(
|
||||
request: Request,
|
||||
{ params }: { params: Promise<{ date: string }> }
|
||||
) {
|
||||
try {
|
||||
const { date } = await params;
|
||||
const memoryDir = '/root/.openclaw/workspace/memory';
|
||||
const filePath = path.join(memoryDir, `${date}.md`);
|
||||
|
||||
if (!fs.existsSync(filePath)) {
|
||||
return NextResponse.json({ content: '', error: 'Not found' }, { status: 404 });
|
||||
}
|
||||
|
||||
const content = fs.readFileSync(filePath, 'utf8');
|
||||
return NextResponse.json({ content, date });
|
||||
} catch (error) {
|
||||
return NextResponse.json({ content: '', error: 'Failed to load' }, { status: 500 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user