Update backend address
This commit is contained in:
5 files changed
+6
-6
No files matched your search
@@ -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 }
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Vendored
+2
-2
@@ -1,7 +1,7 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
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.
|
||||
Reference in New Issue
Block a user