Started to work the shortcodes
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user