mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
更新项目配置,删除不必要的文件,优化依赖项,修复类型定义,添加新歌单样式
This commit is contained in:
@@ -183,7 +183,7 @@ export function downloadConfigDirect(name: string) {
|
||||
})
|
||||
}
|
||||
export type ConfigStatus = 'success' | 'error' | 'notfound'
|
||||
export async function DownloadConfig<T>(name: string): Promise<
|
||||
export async function DownloadConfig<T>(name: string, id?: number): Promise<
|
||||
| {
|
||||
msg: undefined
|
||||
status: ConfigStatus
|
||||
@@ -196,8 +196,9 @@ export async function DownloadConfig<T>(name: string): Promise<
|
||||
}
|
||||
> {
|
||||
try {
|
||||
const resp = await QueryGetAPI<string>(VTSURU_API_URL + 'get-config', {
|
||||
name: name
|
||||
const resp = await QueryGetAPI<string>(VTSURU_API_URL + (id ? 'get-user-config' : 'get-config'), {
|
||||
name: name,
|
||||
id: id
|
||||
})
|
||||
if (resp.code == 200) {
|
||||
console.log('已获取配置文件: ' + name)
|
||||
|
||||
Reference in New Issue
Block a user