Update service endpoint

Update project dependencies

Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
Joe Ma 2023-07-12 10:14:41 +08:00
parent 174885af7c
commit 50244f0c1e
No known key found for this signature in database
GPG key ID: 7A0ECF5F5EDC587F
7 changed files with 195 additions and 195 deletions

View file

@ -22,7 +22,7 @@ import {sha256} from 'js-sha256';
import dedent from 'dedent-js';
// Constants
const SERVICE_URL = 'pb.nekoul.com';
const SERVICE_URL = 'pb.nekoid.cc';
const PASTE_WEB_URL_v1 = 'https://raw.githubusercontent.com/rikkaneko/paste/main/web/v1';
const PASTE_WEB_URL = 'https://raw.githubusercontent.com/rikkaneko/paste/main/web/v2';
const UUID_LENGTH = 4;
@ -476,7 +476,7 @@ async function get_paste_info(uuid: string, descriptor: PasteIndexEntry, env: En
const paste_info = {
uuid,
link,
link_qr: 'https://qrcode.nekoul.com/?' + new URLSearchParams({q: link, type: 'svg'}),
link_qr: 'https://qrcode.nekoid.cc/?' + new URLSearchParams({q: link, type: 'svg'}),
type: descriptor.type ?? 'paste',
title: descriptor.title?.trim(),
mime_type: descriptor.mime_type,
@ -542,7 +542,7 @@ async function get_paste_info(uuid: string, descriptor: PasteIndexEntry, env: En
// Console response
if (need_qr) {
// Cloudflare currently does not support doing a subrequest to the same zone, use service binding instead
const res = await env.QRCODE.fetch('https://qrcode.nekoul.com?' + new URLSearchParams({
const res = await env.QRCODE.fetch('https://qrcode.nekoid.cc?' + new URLSearchParams({
q: link,
type: 'utf8',
}));