Revert "feat: migrate frontend to Astro + expand AI moderation + backend admin/runtime config"
This reverts commit d59b59a7a7.
This commit is contained in:
@@ -4,15 +4,7 @@
|
||||
*/
|
||||
import { describe, it, expect } from "vitest";
|
||||
|
||||
// Safety: never default to a production URL — forces explicit opt-in
|
||||
// via: API_BASE=http://localhost:3001/api vitest run
|
||||
const RAW = process.env.API_BASE;
|
||||
if (!RAW) {
|
||||
throw new Error(
|
||||
"API_BASE is not set. Run with: API_BASE=http://localhost:3001/api vitest run",
|
||||
);
|
||||
}
|
||||
const BASE = RAW;
|
||||
const BASE = process.env.API_BASE ?? "https://imphnen.asepharyana.my.id/api";
|
||||
|
||||
async function api(path: string, init?: RequestInit) {
|
||||
const res = await fetch(`${BASE}${path}`, {
|
||||
|
||||
Reference in New Issue
Block a user