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); setLoading(true);
try { try {
const q = status ? `?status=${encodeURIComponent(status)}&limit=80` : "?limit=80"; 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 || []); setItems(data.items || []);
} catch (e) { } catch (e) {
toast.push((e as Error).message, "error"); toast.push((e as Error).message, "error");

View File

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

View File

@ -34,7 +34,7 @@ export default function YoutubeOAuthHealthPage() {
const load = useCallback(async () => { const load = useCallback(async () => {
setLoading(true); setLoading(true);
try { 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 || []); setRows(data.channels || []);
} catch (e) { } catch (e) {
toast.push((e as Error).message, "error"); 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() e = err.read().decode("utf-8", "replace").strip()
return o, e return o, e
print("[git pull]") print("[git pull origin test1]")
o, e = run(f"cd {REPO} && git pull origin dev 2>&1", timeout=60) 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(o or e)
print("[git log]") print("[git log]")