From d7b70892cd12a9f403f170cd1a3ad0db28072800 Mon Sep 17 00:00:00 2001 From: RTAkland Date: Thu, 27 Aug 2026 21:05:25 +0800 Subject: [PATCH] Update backend address --- snippets-frontend/app/[snippet_id]/page.tsx | 2 +- snippets-frontend/app/page.tsx | 2 +- snippets-frontend/components/snippet-editor.tsx | 2 +- snippets-frontend/lib/snippet-utils.ts | 2 +- snippets-frontend/next-env.d.ts | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/snippets-frontend/app/[snippet_id]/page.tsx b/snippets-frontend/app/[snippet_id]/page.tsx index 7cbb391..5d631a7 100644 --- a/snippets-frontend/app/[snippet_id]/page.tsx +++ b/snippets-frontend/app/[snippet_id]/page.tsx @@ -3,7 +3,7 @@ import {ArrowLeft, ArrowUpRight, FileCode2, RefreshCw, Terminal} from 'lucide-re import {languageLabel, rawSnippetUrl} from '@/lib/snippet-utils' import {SnippetEditor} from '@/components/snippet-editor' -const API_BASE = 'http://127.0.0.1:6868' +const API_BASE = 'https://snippets.rtast.cn' type Snippet = { createdAt?: string; filename: string; content: string } diff --git a/snippets-frontend/app/page.tsx b/snippets-frontend/app/page.tsx index 64b9cf8..c25c3de 100644 --- a/snippets-frontend/app/page.tsx +++ b/snippets-frontend/app/page.tsx @@ -4,7 +4,7 @@ import {FormEvent, useState} from 'react' import {ArrowUpRight, Check, Copy, FileCode2, Loader2, Send, Terminal, X} from 'lucide-react' import {languageLabel, rawSnippetUrl, SnippetEditor, snippetUrl} from '@/components/snippet-editor' -const API_BASE = 'http://127.0.0.1:6868' +const API_BASE = 'https://snippets.rtast.cn' async function copyToClipboard(text: string) { if (navigator.clipboard && window.isSecureContext) { diff --git a/snippets-frontend/components/snippet-editor.tsx b/snippets-frontend/components/snippet-editor.tsx index 7924e32..90ca267 100644 --- a/snippets-frontend/components/snippet-editor.tsx +++ b/snippets-frontend/components/snippet-editor.tsx @@ -78,7 +78,7 @@ export function languageLabel(filename: string) { } export function rawSnippetUrl(id: string) { - return `http://127.0.0.1:6868/${encodeURIComponent(id)}?mode=raw` + return `https://snippets.rtast.cn/${encodeURIComponent(id)}?mode=raw` } export function snippetUrl(id: string) { diff --git a/snippets-frontend/lib/snippet-utils.ts b/snippets-frontend/lib/snippet-utils.ts index 616f641..02e769e 100644 --- a/snippets-frontend/lib/snippet-utils.ts +++ b/snippets-frontend/lib/snippet-utils.ts @@ -4,7 +4,7 @@ export function languageLabel(filename: string) { } export function rawSnippetUrl(id: string) { - return `http://127.0.0.1:6868/${encodeURIComponent(id)}?mode=raw` + return `https://snippets.rtast.cn/${encodeURIComponent(id)}?mode=raw` } export function snippetUrl(id: string) { diff --git a/snippets-frontend/next-env.d.ts b/snippets-frontend/next-env.d.ts index a419cbe..ce4e94a 100644 --- a/snippets-frontend/next-env.d.ts +++ b/snippets-frontend/next-env.d.ts @@ -1,7 +1,7 @@ /// /// -import "./.next/dev/types/routes.d.ts"; -import "./.next/dev/types/root-params.d.ts"; +import "./.next/types/routes.d.ts"; +import "./.next/types/root-params.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.