mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
fix: use default marble data
This commit is contained in:
@@ -6,14 +6,10 @@ import rehypeSlug from "rehype-slug";
|
|||||||
import rehypeAutolinkHeadings from "rehype-autolink-headings";
|
import rehypeAutolinkHeadings from "rehype-autolink-headings";
|
||||||
import rehypeSanitize from "rehype-sanitize";
|
import rehypeSanitize from "rehype-sanitize";
|
||||||
|
|
||||||
const url = process.env.MARBLE_API_URL;
|
const url = process.env.MARBLE_API_URL || "https://api.marblecms.com";
|
||||||
const key = process.env.MARBLE_WORKSPACE_KEY;
|
const key = process.env.MARBLE_WORKSPACE_KEY || "cm6ytuq9x0000i803v0isidst";
|
||||||
|
|
||||||
async function fetchFromMarble<T>(endpoint: string): Promise<T> {
|
async function fetchFromMarble<T>(endpoint: string): Promise<T> {
|
||||||
if (!url || !key) {
|
|
||||||
throw new Error('Missing required environment variables');
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${url}/${key}/${endpoint}`);
|
const response = await fetch(`${url}/${key}/${endpoint}`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user