diff --git a/src/app/common/hastebin.ts b/src/app/common/hastebin.ts index 221a9d6..cf5cd1f 100644 --- a/src/app/common/hastebin.ts +++ b/src/app/common/hastebin.ts @@ -1,4 +1,4 @@ -const HASTE_URL: string = "https://haste.fascinated.cc"; +const HASTE_URL: string = "https://paste.fascinated.cc"; /** * Creates a new haste with the given content. @@ -7,11 +7,11 @@ const HASTE_URL: string = "https://haste.fascinated.cc"; * @returns the URL of the created haste */ export async function createHaste(content: string): Promise { - const response = await fetch(`${HASTE_URL}/documents`, { + const response = await fetch(`${HASTE_URL}/api/upload`, { method: "POST", body: content, }); - const { key } = await response.json(); - return `${HASTE_URL}/${key}`; + const { id } = await response.json(); + return `${HASTE_URL}/${id}`; } diff --git a/src/app/components/code-highlighter.tsx b/src/app/components/code-highlighter.tsx index e5237a5..0cb67da 100644 --- a/src/app/components/code-highlighter.tsx +++ b/src/app/components/code-highlighter.tsx @@ -77,6 +77,7 @@ export function CodeHighlighter({ code, language = "json", rounded = true }: Cod {capitalizeFirstLetter(language)} + {/* Code */}