Spaces:
Running
Running
inject badge only while first creation
Browse filesFiles changed (2)
545 unmodified lines546547548549550551552545 unmodified lines} else if (page.path.endsWith(".json")) {mimeType = "application/json";}const content = (mimeType === "text/html" && isIndexPage(page.path))? injectDeepSiteBadge(page.html): page.html;const file = new File([content], page.path, { type: mimeType });545 unmodified lines546547548549550551552545 unmodified lines} else if (page.path.endsWith(".json")) {mimeType = "application/json";}const content = (mimeType === "text/html" && isIndexPage(page.path)) && isNew? injectDeepSiteBadge(page.html): page.html;const file = new File([content], page.path, { type: mimeType });
2 unmodified lines345678928 unmodified lines38394041424344454647482 unmodified linesimport { isAuthenticated } from "@/lib/auth";import { Page } from "@/types";import { injectDeepSiteBadge, isIndexPage } from "@/lib/inject-badge";export async function PUT(req: NextRequest,28 unmodified lines} else if (page.path.endsWith(".json")) {mimeType = "application/json";}// Inject the DeepSite badge script into index pages only (not components or other HTML files)const content = (mimeType === "text/html" && isIndexPage(page.path))? injectDeepSiteBadge(page.html): page.html;const file = new File([content], page.path, { type: mimeType });files.push(file);});2 unmodified lines34567828 unmodified lines373839404142432 unmodified linesimport { isAuthenticated } from "@/lib/auth";import { Page } from "@/types";export async function PUT(req: NextRequest,28 unmodified lines} else if (page.path.endsWith(".json")) {mimeType = "application/json";}const file = new File([page.html], page.path, { type: mimeType });files.push(file);});
app/api/ask/route.ts+1-1
app/api/me/projects/[namespace]/[repoId]/save/route.ts+1-6