refactor: flatten monorepo structure to backend/ frontend/ devops/
Rename subdirectories for a cleaner single-repo layout: - website-monitoring-backend/ → backend/ - website-monitoring-frontend/ → frontend/ - website-monitoring-devops/ → devops/ Update all references in package.json scripts, CI workflows, docker-compose, pre-commit hooks, and documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { getSupabaseAdmin } from "@/lib/admin";
|
||||
|
||||
export async function GET(
|
||||
request: Request,
|
||||
context: { params: Promise<{ websiteId: string }> },
|
||||
) {
|
||||
try {
|
||||
const { websiteId } = await context.params;
|
||||
|
||||
// Get crawl sessions for this website
|
||||
const { data: sessions, error: sessionsError } = await getSupabaseAdmin()
|
||||
.from("crawl_sessions")
|
||||
.select("*")
|
||||
.eq("website_id", websiteId)
|
||||
.order("created_at", { ascending: false });
|
||||
|
||||
// Get all pages for this website
|
||||
const { data: pages, error: pagesError } = await getSupabaseAdmin()
|
||||
.from("pages")
|
||||
.select("*")
|
||||
.eq("website_id", websiteId)
|
||||
.order("created_at", { ascending: false });
|
||||
|
||||
return NextResponse.json({
|
||||
sessions,
|
||||
sessionsError,
|
||||
pages,
|
||||
pagesError,
|
||||
});
|
||||
} catch (err) {
|
||||
return NextResponse.json({ error: String(err) }, { status: 500 });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user