Update path to frontend static files

Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
Joe Ma 2023-11-19 02:50:56 +08:00
parent 3de4fa14ed
commit 2e9a56376d
No known key found for this signature in database
GPG key ID: 7A0ECF5F5EDC587F
7 changed files with 8 additions and 187 deletions

View file

@ -1,3 +1,3 @@
export const SERVICE_URL = 'pb.nekoid.cc';
export const PASTE_WEB_URL = 'https://raw.githubusercontent.com/rikkaneko/paste/main/static/v2';
export const PASTE_WEB_URL = 'https://raw.githubusercontent.com/rikkaneko/paste/main/frontend';
export const UUID_LENGTH = 4;

View file

@ -56,7 +56,7 @@ router.get('/favicon.ico', () => {
});
// Web script and style file
router.get('/(css|js)/*', (request) => {
router.get('/static/*', (request) => {
const { url } = request;
const { pathname } = new URL(url);
const path = pathname.replace(/\/+$/, '') || '/';