mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-16 23:27:34 +08:00
style: Update globalSettings injection in multiple components
This commit is contained in:
@@ -37,3 +37,13 @@ api.interceptors.response.use(
|
||||
)
|
||||
|
||||
export default api
|
||||
|
||||
export async function fetchGlobalSettings() {
|
||||
try {
|
||||
const result: { [key: string]: any } = await api.get('system/env')
|
||||
return result.data || {}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch global settings', error)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user