Support sub-path deploy via NEXT_PUBLIC_BASE_PATH (loma.chat/pagiva)
Adds basePath config, withBase/appUrl helpers, base-path-aware cookies, OAuth redirects, manifest, service worker and cron runner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"use client";
|
||||
import { withBase } from "@/lib/base-path";
|
||||
|
||||
import { useState } from "react";
|
||||
import { Icon } from "./Icon";
|
||||
@@ -28,7 +29,7 @@ export function PostCheck({ pageId, caption, targets, hasImage }: { pageId: stri
|
||||
async function run() {
|
||||
setBusy(true);
|
||||
setError(null);
|
||||
const res = await fetch("/api/ai/check", {
|
||||
const res = await fetch(withBase("/api/ai/check"), {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ pageId, caption, targets, hasImage }),
|
||||
|
||||
Reference in New Issue
Block a user