mirror of
https://github.com/MengMengCode/CLICD.git
synced 2026-08-07 22:24:42 +08:00
Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -714,6 +714,15 @@ export const createWebSSHTicket = (containerName: string) =>
|
||||
export const createVNCTicket = (containerName: string) =>
|
||||
api.post<APIResponse<{ ticket: string }>>('/vnc-ticket', { container_name: containerName })
|
||||
|
||||
// Language
|
||||
export type PanelLanguage = 'zh' | 'en'
|
||||
|
||||
export const getLanguage = () =>
|
||||
api.get<APIResponse<{ language: PanelLanguage }>>('/language')
|
||||
|
||||
export const updateLanguage = (language: PanelLanguage) =>
|
||||
api.post<APIResponse<{ language: PanelLanguage }>>('/language', { language })
|
||||
|
||||
// Version
|
||||
export const getVersion = () =>
|
||||
api.get<APIResponse<{ version: string }>>('/version')
|
||||
|
||||
Reference in New Issue
Block a user