mirror of
https://github.com/thiloho/archtika.git
synced 2025-11-22 02:41:35 +01:00
Put API prefix in server only file to access process.env
This commit is contained in:
@@ -113,7 +113,7 @@ export const md = markdownit({
|
||||
md.core.ruler.push("header_sections", addSections);
|
||||
});
|
||||
|
||||
export const handleImagePaste = async (event: ClipboardEvent) => {
|
||||
export const handleImagePaste = async (event: ClipboardEvent, API_BASE_PREFIX: string) => {
|
||||
const clipboardItems = Array.from(event.clipboardData?.items || []);
|
||||
const file = clipboardItems.find((item) => item.type.startsWith("image/"));
|
||||
|
||||
@@ -145,6 +145,3 @@ export const handleImagePaste = async (event: ClipboardEvent) => {
|
||||
|
||||
return newContent;
|
||||
};
|
||||
|
||||
export const API_BASE_PREFIX = dev ? "http://localhost:3000" : `${import.meta.env.PUBLIC_ORIGIN}/api`;
|
||||
export const NGINX_BASE_PREFIX = dev ? "http://localhost:18000" : "";
|
||||
|
||||
Reference in New Issue
Block a user