Started to work the shortcodes

This commit is contained in:
cdricms
2025-01-24 18:07:04 +01:00
parent 78ce2b533b
commit f1a49eea83
19 changed files with 713 additions and 38 deletions

View File

@@ -11,7 +11,7 @@ export interface ApiResponse<T> {
}
export async function request<T>(
url: string,
endpoint: string,
options: {
method?: "GET" | "POST" | "PATCH" | "DELETE";
body?: any;
@@ -39,7 +39,7 @@ export async function request<T>(
headers.Authorization = `Bearer ${authToken}`;
}
const response = await fetch(`${API_URL}${url}`, {
const response = await fetch(`${API_URL}${endpoint}`, {
method,
headers,
body: body ? JSON.stringify(body) : undefined,