fix: use separate env var for server side address of musikquad
This commit is contained in:
parent
d72b4214b8
commit
76021dcf70
@ -1,5 +1,4 @@
|
||||
import { PUBLIC_MUSIKQUAD_SERVER } from '$env/static/public';
|
||||
import { scheme } from '../../../utils';
|
||||
import { LOCAL_MUSIKQUAD_SERVER } from '$env/static/private';
|
||||
|
||||
interface MusicInfo {
|
||||
title: string,
|
||||
@ -8,12 +7,12 @@ interface MusicInfo {
|
||||
}
|
||||
|
||||
export async function load({ params }) {
|
||||
const server = PUBLIC_MUSIKQUAD_SERVER;
|
||||
const resp = await fetch(`${scheme}://${server}/share/info/${params.token}`);
|
||||
const server = LOCAL_MUSIKQUAD_SERVER;
|
||||
const resp = await fetch(`${server}/share/info/${params.token}`);
|
||||
const info: MusicInfo = await resp.json();
|
||||
return {
|
||||
info,
|
||||
thumbnail_url: `${scheme}://${server}/share/thumbnail/${params.token}`,
|
||||
audio_url: `${scheme}://${server}/share/audio/${params.token}`,
|
||||
thumbnail_url: `${server}/share/thumbnail/${params.token}`,
|
||||
audio_url: `${server}/share/audio/${params.token}`,
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user