mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-28 03:39:46 +08:00
更新fetchGlobalSettings函数:在API请求中添加token参数以增强安全性
This commit is contained in:
@@ -44,7 +44,11 @@ export default api
|
|||||||
|
|
||||||
export async function fetchGlobalSettings() {
|
export async function fetchGlobalSettings() {
|
||||||
try {
|
try {
|
||||||
const result: { [key: string]: any } = await api.get('system/global')
|
const result: { [key: string]: any } = await api.get('system/global', {
|
||||||
|
params: {
|
||||||
|
token: 'moviepilot',
|
||||||
|
},
|
||||||
|
})
|
||||||
return result.data || {}
|
return result.data || {}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to fetch global settings', error)
|
console.error('Failed to fetch global settings', error)
|
||||||
|
|||||||
Reference in New Issue
Block a user