fix: remove fetchJson generic args for JS api helper build

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
eric 2026-08-23 08:09:45 -05:00
parent 0109f46cd7
commit faf576c151
4 changed files with 12 additions and 8 deletions

View File

@ -35,7 +35,7 @@ export default function DashboardPage() {
setLoading(true);
try {
const q = status ? `?status=${encodeURIComponent(status)}&limit=80` : "?limit=80";
const data = await fetchJson<{ items?: JobRow[] }>(`/api/dashboard/jobs${q}`);
const data = (await fetchJson(`/api/dashboard/jobs${q}`)) as { items?: JobRow[] };
setItems(data.items || []);
} catch (e) {
toast.push((e as Error).message, "error");

View File

@ -33,11 +33,11 @@ export default function OpsMobilePage() {
setLoading(true);
try {
const [h, m] = await Promise.all([
fetchJson<Health>("/api/health"),
fetchJson<Metrics>("/api/ops/alerts/metrics"),
fetchJson("/api/health"),
fetchJson("/api/ops/alerts/metrics"),
]);
setHealth(h);
setMetrics(m);
setHealth(h as Health);
setMetrics(m as Metrics);
} catch (e) {
toast.push((e as Error).message, "error");
} finally {

View File

@ -34,7 +34,7 @@ export default function YoutubeOAuthHealthPage() {
const load = useCallback(async () => {
setLoading(true);
try {
const data = await fetchJson<{ channels?: ChannelRow[] }>("/api/youtube/oauth-health");
const data = (await fetchJson("/api/youtube/oauth-health")) as { channels?: ChannelRow[] };
setRows(data.channels || []);
} catch (e) {
toast.push((e as Error).message, "error");

View File

@ -16,8 +16,12 @@ def run(cmd, timeout=300):
e = err.read().decode("utf-8", "replace").strip()
return o, e
print("[git pull]")
o, e = run(f"cd {REPO} && git pull origin dev 2>&1", timeout=60)
print("[git pull origin test1]")
o, e = run(
f"cd {REPO} && git stash push -u -m pre-deploy-test1 2>/dev/null; "
f"git fetch origin test1 && git checkout test1 && git pull --ff-only origin test1 2>&1",
timeout=120,
)
print(o or e)
print("[git log]")