diff --git a/internal/apps/fail2ban/app.go b/internal/apps/fail2ban/app.go index 3c80910e..aec5d10a 100644 --- a/internal/apps/fail2ban/app.go +++ b/internal/apps/fail2ban/app.go @@ -37,8 +37,8 @@ func (s *App) Route(r chi.Router) { r.Delete("/jails", s.Delete) r.Get("/jails/{name}", s.BanList) r.Post("/unban", s.Unban) - r.Post("/whiteList", s.SetWhiteList) - r.Get("/whiteList", s.GetWhiteList) + r.Post("/white_list", s.SetWhiteList) + r.Get("/white_list", s.GetWhiteList) } // List 所有规则 diff --git a/internal/apps/mysql/app.go b/internal/apps/mysql/app.go index 5826e514..43a76877 100644 --- a/internal/apps/mysql/app.go +++ b/internal/apps/mysql/app.go @@ -37,11 +37,11 @@ func (s *App) Route(r chi.Router) { r.Get("/load", s.Load) r.Get("/config", s.GetConfig) r.Post("/config", s.UpdateConfig) - r.Post("/clearErrorLog", s.ClearErrorLog) - r.Get("/slowLog", s.SlowLog) - r.Post("/clearSlowLog", s.ClearSlowLog) - r.Get("/rootPassword", s.GetRootPassword) - r.Post("/rootPassword", s.SetRootPassword) + r.Post("/clear_error_log", s.ClearErrorLog) + r.Get("/slow_log", s.SlowLog) + r.Post("/clear_slow_log", s.ClearSlowLog) + r.Get("/root_password", s.GetRootPassword) + r.Post("/root_password", s.SetRootPassword) } // GetConfig 获取配置 diff --git a/internal/apps/nginx/app.go b/internal/apps/nginx/app.go index 10847da5..c213cf7a 100644 --- a/internal/apps/nginx/app.go +++ b/internal/apps/nginx/app.go @@ -34,8 +34,8 @@ func (s *App) Route(r chi.Router) { r.Get("/load", s.Load) r.Get("/config", s.GetConfig) r.Post("/config", s.SaveConfig) - r.Get("/errorLog", s.ErrorLog) - r.Post("/clearErrorLog", s.ClearErrorLog) + r.Get("/error_log", s.ErrorLog) + r.Post("/clear_error_log", s.ClearErrorLog) } func (s *App) GetConfig(w http.ResponseWriter, r *http.Request) { diff --git a/internal/apps/php/app.go b/internal/apps/php/app.go index 64c9ed25..6855e4c0 100644 --- a/internal/apps/php/app.go +++ b/internal/apps/php/app.go @@ -40,16 +40,16 @@ func (s *App) Route(version uint) func(r chi.Router) { php.version = version php.t = s.t php.taskRepo = s.taskRepo - r.Post("/setCli", php.SetCli) + r.Post("/set_cli", php.SetCli) r.Get("/config", php.GetConfig) r.Post("/config", php.UpdateConfig) - r.Get("/fpmConfig", php.GetFPMConfig) - r.Post("/fpmConfig", php.UpdateFPMConfig) + r.Get("/fpm_config", php.GetFPMConfig) + r.Post("/fpm_config", php.UpdateFPMConfig) r.Get("/load", php.Load) - r.Get("/errorLog", php.ErrorLog) - r.Get("/slowLog", php.SlowLog) - r.Post("/clearErrorLog", php.ClearErrorLog) - r.Post("/clearSlowLog", php.ClearSlowLog) + r.Get("/error_log", php.ErrorLog) + r.Get("/slow_log", php.SlowLog) + r.Post("/clear_error_log", php.ClearErrorLog) + r.Post("/clear_slow_log", php.ClearSlowLog) r.Get("/extensions", php.ExtensionList) r.Post("/extensions", php.InstallExtension) r.Delete("/extensions", php.UninstallExtension) diff --git a/internal/apps/podman/app.go b/internal/apps/podman/app.go index e459bb58..8d4768b4 100644 --- a/internal/apps/podman/app.go +++ b/internal/apps/podman/app.go @@ -17,10 +17,10 @@ func NewApp() *App { } func (s *App) Route(r chi.Router) { - r.Get("/registryConfig", s.GetRegistryConfig) - r.Post("/registryConfig", s.UpdateRegistryConfig) - r.Get("/storageConfig", s.GetStorageConfig) - r.Post("/storageConfig", s.UpdateStorageConfig) + r.Get("/registry_config", s.GetRegistryConfig) + r.Post("/registry_config", s.UpdateRegistryConfig) + r.Get("/storage_config", s.GetStorageConfig) + r.Post("/storage_config", s.UpdateStorageConfig) } func (s *App) GetRegistryConfig(w http.ResponseWriter, r *http.Request) { diff --git a/internal/apps/postgresql/app.go b/internal/apps/postgresql/app.go index e82415b0..0d269d21 100644 --- a/internal/apps/postgresql/app.go +++ b/internal/apps/postgresql/app.go @@ -29,11 +29,11 @@ func NewApp(t *gotext.Locale) *App { func (s *App) Route(r chi.Router) { r.Get("/config", s.GetConfig) r.Post("/config", s.UpdateConfig) - r.Get("/userConfig", s.GetUserConfig) - r.Post("/userConfig", s.UpdateUserConfig) + r.Get("/user_config", s.GetUserConfig) + r.Post("/user_config", s.UpdateUserConfig) r.Get("/load", s.Load) r.Get("/log", s.Log) - r.Post("/clearLog", s.ClearLog) + r.Post("/clear_log", s.ClearLog) } // GetConfig 获取配置 diff --git a/internal/apps/supervisor/app.go b/internal/apps/supervisor/app.go index 11c1b1d4..181ea2d0 100644 --- a/internal/apps/supervisor/app.go +++ b/internal/apps/supervisor/app.go @@ -37,7 +37,7 @@ func NewApp(t *gotext.Locale) *App { func (s *App) Route(r chi.Router) { r.Get("/service", s.Service) - r.Post("/clearLog", s.ClearLog) + r.Post("/clear_log", s.ClearLog) r.Get("/config", s.GetConfig) r.Post("/config", s.UpdateConfig) r.Get("/processes", s.Processes) @@ -45,7 +45,7 @@ func (s *App) Route(r chi.Router) { r.Post("/processes/{process}/stop", s.StopProcess) r.Post("/processes/{process}/restart", s.RestartProcess) r.Get("/processes/{process}/log", s.ProcessLog) - r.Post("/processes/{process}/clearLog", s.ClearProcessLog) + r.Post("/processes/{process}/clear_log", s.ClearProcessLog) r.Get("/processes/{process}", s.ProcessConfig) r.Post("/processes/{process}", s.UpdateProcessConfig) r.Delete("/processes/{process}", s.DeleteProcess) diff --git a/internal/apps/toolbox/app.go b/internal/apps/toolbox/app.go index a77a54eb..79269c89 100644 --- a/internal/apps/toolbox/app.go +++ b/internal/apps/toolbox/app.go @@ -39,12 +39,12 @@ func (s *App) Route(r chi.Router) { r.Get("/timezone", s.GetTimezone) r.Post("/timezone", s.UpdateTimezone) r.Post("/time", s.UpdateTime) - r.Post("/syncTime", s.SyncTime) + r.Post("/sync_time", s.SyncTime) r.Get("/hostname", s.GetHostname) r.Post("/hostname", s.UpdateHostname) r.Get("/hosts", s.GetHosts) r.Post("/hosts", s.UpdateHosts) - r.Post("/rootPassword", s.UpdateRootPassword) + r.Post("/root_password", s.UpdateRootPassword) } // GetDNS 获取 DNS 信息 diff --git a/internal/route/http.go b/internal/route/http.go index 7cacdcba..3c2c7531 100644 --- a/internal/route/http.go +++ b/internal/route/http.go @@ -110,19 +110,19 @@ func (route *Http) Register(r *chi.Mux) { r.Get("/key", route.user.GetKey) r.With(middleware.Throttle(5, time.Minute)).Post("/login", route.user.Login) r.Post("/logout", route.user.Logout) - r.Get("/isLogin", route.user.IsLogin) + r.Get("/is_login", route.user.IsLogin) r.Get("/info", route.user.Info) }) r.Route("/dashboard", func(r chi.Router) { r.Get("/panel", route.dashboard.Panel) - r.Get("/homeApps", route.dashboard.HomeApps) + r.Get("/home_apps", route.dashboard.HomeApps) r.Post("/current", route.dashboard.Current) - r.Get("/systemInfo", route.dashboard.SystemInfo) - r.Get("/countInfo", route.dashboard.CountInfo) - r.Get("/installedDbAndPhp", route.dashboard.InstalledDbAndPhp) - r.Get("/checkUpdate", route.dashboard.CheckUpdate) - r.Get("/updateInfo", route.dashboard.UpdateInfo) + r.Get("/system_info", route.dashboard.SystemInfo) + r.Get("/count_info", route.dashboard.CountInfo) + r.Get("/installed_db_and_php", route.dashboard.InstalledDbAndPhp) + r.Get("/check_update", route.dashboard.CheckUpdate) + r.Get("/update_info", route.dashboard.UpdateInfo) r.Post("/update", route.dashboard.Update) r.Post("/restart", route.dashboard.Restart) }) @@ -136,18 +136,18 @@ func (route *Http) Register(r *chi.Mux) { r.Route("/website", func(r chi.Router) { r.Get("/rewrites", route.website.GetRewrites) - r.Get("/defaultConfig", route.website.GetDefaultConfig) - r.Post("/defaultConfig", route.website.UpdateDefaultConfig) + r.Get("/default_config", route.website.GetDefaultConfig) + r.Post("/default_config", route.website.UpdateDefaultConfig) r.Get("/", route.website.List) r.Post("/", route.website.Create) r.Get("/{id}", route.website.Get) r.Put("/{id}", route.website.Update) r.Delete("/{id}", route.website.Delete) r.Delete("/{id}/log", route.website.ClearLog) - r.Post("/{id}/updateRemark", route.website.UpdateRemark) - r.Post("/{id}/resetConfig", route.website.ResetConfig) + r.Post("/{id}/update_remark", route.website.UpdateRemark) + r.Post("/{id}/reset_config", route.website.ResetConfig) r.Post("/{id}/status", route.website.UpdateStatus) - r.Post("/{id}/obtainCert", route.website.ObtainCert) + r.Post("/{id}/obtain_cert", route.website.ObtainCert) }) r.Route("/database", func(r chi.Router) { @@ -157,7 +157,7 @@ func (route *Http) Register(r *chi.Mux) { r.Post("/comment", route.database.Comment) }) - r.Route("/databaseServer", func(r chi.Router) { + r.Route("/database_server", func(r chi.Router) { r.Get("/", route.databaseServer.List) r.Post("/", route.databaseServer.Create) r.Get("/{id}", route.databaseServer.Get) @@ -167,7 +167,7 @@ func (route *Http) Register(r *chi.Mux) { r.Post("/{id}/sync", route.databaseServer.Sync) }) - r.Route("/databaseUser", func(r chi.Router) { + r.Route("/database_user", func(r chi.Router) { r.Get("/", route.databaseUser.List) r.Post("/", route.databaseUser.Create) r.Get("/{id}", route.databaseUser.Get) @@ -185,8 +185,8 @@ func (route *Http) Register(r *chi.Mux) { }) r.Route("/cert", func(r chi.Router) { - r.Get("/caProviders", route.cert.CAProviders) - r.Get("/dnsProviders", route.cert.DNSProviders) + r.Get("/ca_providers", route.cert.CAProviders) + r.Get("/dns_providers", route.cert.DNSProviders) r.Get("/algorithms", route.cert.Algorithms) r.Route("/cert", func(r chi.Router) { r.Get("/", route.cert.List) @@ -195,11 +195,11 @@ func (route *Http) Register(r *chi.Mux) { r.Put("/{id}", route.cert.Update) r.Get("/{id}", route.cert.Get) r.Delete("/{id}", route.cert.Delete) - r.Post("/{id}/obtainAuto", route.cert.ObtainAuto) - r.Post("/{id}/obtainManual", route.cert.ObtainManual) - r.Post("/{id}/obtainSelfSigned", route.cert.ObtainSelfSigned) + r.Post("/{id}/obtain_auto", route.cert.ObtainAuto) + r.Post("/{id}/obtain_manual", route.cert.ObtainManual) + r.Post("/{id}/obtain_self_signed", route.cert.ObtainSelfSigned) r.Post("/{id}/renew", route.cert.Renew) - r.Post("/{id}/manualDNS", route.cert.ManualDNS) + r.Post("/{id}/manual_dns", route.cert.ManualDNS) r.Post("/{id}/deploy", route.cert.Deploy) }) r.Route("/dns", func(r chi.Router) { @@ -223,9 +223,9 @@ func (route *Http) Register(r *chi.Mux) { r.Post("/install", route.app.Install) r.Post("/uninstall", route.app.Uninstall) r.Post("/update", route.app.Update) - r.Post("/updateShow", route.app.UpdateShow) - r.Get("/isInstalled", route.app.IsInstalled) - r.Get("/updateCache", route.app.UpdateCache) + r.Post("/update_show", route.app.UpdateShow) + r.Get("/is_installed", route.app.IsInstalled) + r.Get("/update_cache", route.app.UpdateCache) }) r.Route("/cron", func(r chi.Router) { @@ -255,9 +255,9 @@ func (route *Http) Register(r *chi.Mux) { r.Get("/rule", route.firewall.GetRules) r.Post("/rule", route.firewall.CreateRule) r.Delete("/rule", route.firewall.DeleteRule) - r.Get("/ipRule", route.firewall.GetIPRules) - r.Post("/ipRule", route.firewall.CreateIPRule) - r.Delete("/ipRule", route.firewall.DeleteIPRule) + r.Get("/ip_rule", route.firewall.GetIPRules) + r.Post("/ip_rule", route.firewall.CreateIPRule) + r.Delete("/ip_rule", route.firewall.DeleteIPRule) r.Get("/forward", route.firewall.GetForwards) r.Post("/forward", route.firewall.CreateForward) r.Delete("/forward", route.firewall.DeleteForward) @@ -326,11 +326,11 @@ func (route *Http) Register(r *chi.Mux) { r.Post("/move", route.file.Move) r.Post("/copy", route.file.Copy) r.Get("/download", route.file.Download) - r.Post("/remoteDownload", route.file.RemoteDownload) + r.Post("/remote_download", route.file.RemoteDownload) r.Get("/info", route.file.Info) r.Post("/permission", route.file.Permission) r.Post("/compress", route.file.Compress) - r.Post("/unCompress", route.file.UnCompress) + r.Post("/un_compress", route.file.UnCompress) r.Get("/search", route.file.Search) r.Get("/list", route.file.List) }) @@ -349,7 +349,7 @@ func (route *Http) Register(r *chi.Mux) { r.Route("/systemctl", func(r chi.Router) { r.Get("/status", route.systemctl.Status) - r.Get("/isEnabled", route.systemctl.IsEnabled) + r.Get("/is_enabled", route.systemctl.IsEnabled) r.Post("/enable", route.systemctl.Enable) r.Post("/disable", route.systemctl.Disable) r.Post("/restart", route.systemctl.Restart) diff --git a/web/src/api/apps/fail2ban/index.ts b/web/src/api/apps/fail2ban/index.ts index 9f67256f..3494104f 100644 --- a/web/src/api/apps/fail2ban/index.ts +++ b/web/src/api/apps/fail2ban/index.ts @@ -13,7 +13,7 @@ export default { // 解封 IP unban: (name: string, ip: string): any => http.Post('/apps/fail2ban/unban', { name, ip }), // 获取白名单 - whitelist: (): any => http.Get('/apps/fail2ban/whiteList'), + whitelist: (): any => http.Get('/apps/fail2ban/white_list'), // 设置白名单 - setWhitelist: (ip: string): any => http.Post('/apps/fail2ban/whiteList', { ip }) + setWhitelist: (ip: string): any => http.Post('/apps/fail2ban/white_list', { ip }) } diff --git a/web/src/api/apps/mysql/index.ts b/web/src/api/apps/mysql/index.ts index cc39ba6c..5f76e241 100644 --- a/web/src/api/apps/mysql/index.ts +++ b/web/src/api/apps/mysql/index.ts @@ -8,13 +8,13 @@ export default { // 保存配置 saveConfig: (config: string): any => http.Post('/apps/mysql/config', { config }), // 清空错误日志 - clearErrorLog: (): any => http.Post('/apps/mysql/clearErrorLog'), + clearErrorLog: (): any => http.Post('/apps/mysql/clear_error_log'), // 获取慢查询日志 - slowLog: (): any => http.Get('/apps/mysql/slowLog'), + slowLog: (): any => http.Get('/apps/mysql/slow_log'), // 清空慢查询日志 - clearSlowLog: (): any => http.Post('/apps/mysql/clearSlowLog'), + clearSlowLog: (): any => http.Post('/apps/mysql/clear_slow_log'), // 获取 root 密码 - rootPassword: (): any => http.Get('/apps/mysql/rootPassword'), + rootPassword: (): any => http.Get('/apps/mysql/root_password'), // 修改 root 密码 - setRootPassword: (password: string): any => http.Post('/apps/mysql/rootPassword', { password }) + setRootPassword: (password: string): any => http.Post('/apps/mysql/root_password', { password }) } diff --git a/web/src/api/apps/nginx/index.ts b/web/src/api/apps/nginx/index.ts index f02a6b51..14127b14 100644 --- a/web/src/api/apps/nginx/index.ts +++ b/web/src/api/apps/nginx/index.ts @@ -8,7 +8,7 @@ export default { // 保存配置 saveConfig: (config: string): any => http.Post('/apps/nginx/config', { config }), // 获取错误日志 - errorLog: (): any => http.Get('/apps/nginx/errorLog'), + errorLog: (): any => http.Get('/apps/nginx/error_log'), // 清空错误日志 - clearErrorLog: (): any => http.Post('/apps/nginx/clearErrorLog') + clearErrorLog: (): any => http.Post('/apps/nginx/clear_error_log') } diff --git a/web/src/api/apps/php/index.ts b/web/src/api/apps/php/index.ts index 5bc92e7d..8c105060 100644 --- a/web/src/api/apps/php/index.ts +++ b/web/src/api/apps/php/index.ts @@ -2,27 +2,27 @@ import { http } from '@/utils' export default { // 设为 CLI 版本 - setCli: (version: number): any => http.Post(`/apps/php${version}/setCli`), + setCli: (version: number): any => http.Post(`/apps/php${version}/set_cli`), // 获取配置 config: (version: number): any => http.Get(`/apps/php${version}/config`), // 保存配置 saveConfig: (version: number, config: string): any => http.Post(`/apps/php${version}/config`, { config }), // 获取FPM配置 - fpmConfig: (version: number): any => http.Get(`/apps/php${version}/fpmConfig`), + fpmConfig: (version: number): any => http.Get(`/apps/php${version}/fpm_config`), // 保存FPM配置 saveFPMConfig: (version: number, config: string): any => - http.Post(`/apps/php${version}/fpmConfig`, { config }), + http.Post(`/apps/php${version}/fpm_config`, { config }), // 负载状态 load: (version: number): any => http.Get(`/apps/php${version}/load`), // 获取错误日志 - errorLog: (version: number): any => http.Get(`/apps/php${version}/errorLog`), + errorLog: (version: number): any => http.Get(`/apps/php${version}/error_log`), // 清空错误日志 - clearErrorLog: (version: number): any => http.Post(`/apps/php${version}/clearErrorLog`), + clearErrorLog: (version: number): any => http.Post(`/apps/php${version}/clear_error_log`), // 获取慢日志 - slowLog: (version: number): any => http.Get(`/apps/php${version}/slowLog`), + slowLog: (version: number): any => http.Get(`/apps/php${version}/slow_log`), // 清空慢日志 - clearSlowLog: (version: number): any => http.Post(`/apps/php${version}/clearSlowLog`), + clearSlowLog: (version: number): any => http.Post(`/apps/php${version}/clear_slow_log`), // 拓展列表 extensions: (version: number): any => http.Get(`/apps/php${version}/extensions`), // 安装拓展 diff --git a/web/src/api/apps/podman/index.ts b/web/src/api/apps/podman/index.ts index 42c7ed14..afa496fa 100644 --- a/web/src/api/apps/podman/index.ts +++ b/web/src/api/apps/podman/index.ts @@ -2,11 +2,11 @@ import { http } from '@/utils' export default { // 获取注册表配置 - registryConfig: (): any => http.Get('/apps/podman/registryConfig'), + registryConfig: (): any => http.Get('/apps/podman/registry_config'), // 保存注册表配置 - saveRegistryConfig: (config: string): any => http.Post('/apps/podman/registryConfig', { config }), + saveRegistryConfig: (config: string): any => http.Post('/apps/podman/registry_config', { config }), // 获取存储配置 - storageConfig: (): any => http.Get('/apps/podman/storageConfig'), + storageConfig: (): any => http.Get('/apps/podman/storage_config'), // 保存存储配置 - saveStorageConfig: (config: string): any => http.Post('/apps/podman/storageConfig', { config }) + saveStorageConfig: (config: string): any => http.Post('/apps/podman/storage_config', { config }) } diff --git a/web/src/api/apps/postgresql/index.ts b/web/src/api/apps/postgresql/index.ts index 543095e5..caea8cd1 100644 --- a/web/src/api/apps/postgresql/index.ts +++ b/web/src/api/apps/postgresql/index.ts @@ -8,11 +8,11 @@ export default { // 保存配置 saveConfig: (config: string): any => http.Post('/apps/postgresql/config', { config }), // 获取用户配置 - userConfig: (): any => http.Get('/apps/postgresql/userConfig'), + userConfig: (): any => http.Get('/apps/postgresql/user_config'), // 保存配置 - saveUserConfig: (config: string): any => http.Post('/apps/postgresql/userConfig', { config }), + saveUserConfig: (config: string): any => http.Post('/apps/postgresql/user_config', { config }), // 获取日志 log: (): any => http.Get('/apps/postgresql/log'), // 清空错误日志 - clearLog: (): any => http.Post('/apps/postgresql/clearLog') + clearLog: (): any => http.Post('/apps/postgresql/clear_log') } diff --git a/web/src/api/apps/supervisor/index.ts b/web/src/api/apps/supervisor/index.ts index 179b8b9d..81622401 100644 --- a/web/src/api/apps/supervisor/index.ts +++ b/web/src/api/apps/supervisor/index.ts @@ -6,7 +6,7 @@ export default { // 获取错误日志 log: (): any => http.Get('/apps/supervisor/log'), // 清空错误日志 - clearLog: (): any => http.Post('/apps/supervisor/clearLog'), + clearLog: (): any => http.Post('/apps/supervisor/clear_log'), // 获取配置 config: (): any => http.Get('/apps/supervisor/config'), // 保存配置 @@ -25,7 +25,7 @@ export default { processLog: (process: string): any => http.Get(`/apps/supervisor/processes/${process}/log`), // 清空进程日志 clearProcessLog: (process: string): any => - http.Post(`/apps/supervisor/processes/${process}/clearLog`), + http.Post(`/apps/supervisor/processes/${process}/clear_log`), // 进程配置 processConfig: (process: string): any => http.Get(`/apps/supervisor/processes/${process}`), // 保存进程配置 diff --git a/web/src/api/apps/toolbox/index.ts b/web/src/api/apps/toolbox/index.ts index 9ae7ddde..a04509bf 100644 --- a/web/src/api/apps/toolbox/index.ts +++ b/web/src/api/apps/toolbox/index.ts @@ -16,7 +16,7 @@ export default { // 设置时间 updateTime: (time: string): any => http.Post('/apps/toolbox/time', { time }), // 同步时间 - syncTime: (): any => http.Post('/apps/toolbox/syncTime'), + syncTime: (): any => http.Post('/apps/toolbox/sync_time'), // 主机名 hostname: (): any => http.Get('/apps/toolbox/hostname'), // Hosts @@ -27,5 +27,5 @@ export default { updateHosts: (hosts: string): any => http.Post('/apps/toolbox/hosts', { hosts }), // 设置 Root 密码 updateRootPassword: (password: string): any => - http.Post('/apps/toolbox/rootPassword', { password }) + http.Post('/apps/toolbox/root_password', { password }) } diff --git a/web/src/api/panel/app/index.ts b/web/src/api/panel/app/index.ts index 65ecb795..840f79d6 100644 --- a/web/src/api/panel/app/index.ts +++ b/web/src/api/panel/app/index.ts @@ -11,9 +11,9 @@ export default { // 更新应用 update: (slug: string): any => http.Post('/app/update', { slug }), // 设置首页显示 - updateShow: (slug: string, show: boolean): any => http.Post('/app/updateShow', { slug, show }), + updateShow: (slug: string, show: boolean): any => http.Post('/app/update_show', { slug, show }), // 应用是否已安装 - isInstalled: (slug: string): any => http.Get('/app/isInstalled', { params: { slug } }), + isInstalled: (slug: string): any => http.Get('/app/is_installed', { params: { slug } }), // 更新缓存 - updateCache: (): any => http.Get('/app/updateCache') + updateCache: (): any => http.Get('/app/update_cache') } diff --git a/web/src/api/panel/cert/index.ts b/web/src/api/panel/cert/index.ts index 8a360129..2aceba20 100644 --- a/web/src/api/panel/cert/index.ts +++ b/web/src/api/panel/cert/index.ts @@ -2,9 +2,9 @@ import { http } from '@/utils' export default { // CA 供应商列表 - caProviders: (): any => http.Get('/cert/caProviders'), + caProviders: (): any => http.Get('/cert/ca_providers'), // DNS 供应商列表 - dnsProviders: (): any => http.Get('/cert/dnsProviders'), + dnsProviders: (): any => http.Get('/cert/dns_providers'), // 证书算法列表 algorithms: (): any => http.Get('/cert/algorithms'), // ACME 账号列表 @@ -41,15 +41,15 @@ export default { // 证书删除 certDelete: (id: number): any => http.Delete(`/cert/cert/${id}`), // 证书自动签发 - obtainAuto: (id: number): any => http.Post(`/cert/cert/${id}/obtainAuto`, { id }), + obtainAuto: (id: number): any => http.Post(`/cert/cert/${id}/obtain_auto`, { id }), // 证书手动签发 - obtainManual: (id: number): any => http.Post(`/cert/cert/${id}/obtainManual`, { id }), + obtainManual: (id: number): any => http.Post(`/cert/cert/${id}/obtain_manual`, { id }), // 证书自签名签发 - obtainSelfSigned: (id: number): any => http.Post(`/cert/cert/${id}/obtainSelfSigned`, { id }), + obtainSelfSigned: (id: number): any => http.Post(`/cert/cert/${id}/obtain_self_signed`, { id }), // 续签 renew: (id: number): any => http.Post(`/cert/cert/${id}/renew`, { id }), // 获取 DNS 记录 - manualDNS: (id: number): any => http.Post(`/cert/cert/${id}/manualDNS`, { id }), + manualDNS: (id: number): any => http.Post(`/cert/cert/${id}/manual_dns`, { id }), // 部署 deploy: (id: number, website_id: number): any => http.Post(`/cert/cert/${id}/deploy`, { id, website_id }) diff --git a/web/src/api/panel/dashboard/index.ts b/web/src/api/panel/dashboard/index.ts index cae8bbd0..c8dcb391 100644 --- a/web/src/api/panel/dashboard/index.ts +++ b/web/src/api/panel/dashboard/index.ts @@ -4,20 +4,20 @@ export default { // 面板信息 panel: (): any => http.Get('/dashboard/panel'), // 首页应用 - homeApps: (): any => http.Get('/dashboard/homeApps'), + homeApps: (): any => http.Get('/dashboard/home_apps'), // 实时信息 current: (nets: string[], disks: string[]): any => http.Post('/dashboard/current', { nets, disks }, { meta: { noAlert: true } }), // 系统信息 - systemInfo: (): any => http.Get('/dashboard/systemInfo'), + systemInfo: (): any => http.Get('/dashboard/system_info'), // 统计信息 - countInfo: (): any => http.Get('/dashboard/countInfo'), + countInfo: (): any => http.Get('/dashboard/count_info'), // 已安装的数据库和PHP - installedDbAndPhp: (): any => http.Get('/dashboard/installedDbAndPhp'), + installedDbAndPhp: (): any => http.Get('/dashboard/installed_db_and_php'), // 检查更新 - checkUpdate: (): any => http.Get('/dashboard/checkUpdate'), + checkUpdate: (): any => http.Get('/dashboard/check_update'), // 更新日志 - updateInfo: (): any => http.Get('/dashboard/updateInfo'), + updateInfo: (): any => http.Get('/dashboard/update_info'), // 更新面板 update: (): any => http.Post('/dashboard/update'), // 重启面板 diff --git a/web/src/api/panel/database/index.ts b/web/src/api/panel/database/index.ts index 5362bb3d..ad9cda75 100644 --- a/web/src/api/panel/database/index.ts +++ b/web/src/api/panel/database/index.ts @@ -12,30 +12,30 @@ export default { http.Post(`/database/comment`, { server_id, name, comment }), // 获取数据库服务器列表 serverList: (page: number, limit: number) => - http.Get('/databaseServer', { params: { page, limit } }), + http.Get('/database_server', { params: { page, limit } }), // 创建数据库服务器 - serverCreate: (data: any) => http.Post('/databaseServer', data), + serverCreate: (data: any) => http.Post('/database_server', data), // 获取数据库服务器 - serverGet: (id: number) => http.Get(`/databaseServer/${id}`), + serverGet: (id: number) => http.Get(`/database_server/${id}`), // 更新数据库服务器 - serverUpdate: (id: number, data: any) => http.Put(`/databaseServer/${id}`, data), + serverUpdate: (id: number, data: any) => http.Put(`/database_server/${id}`, data), // 删除数据库服务器 - serverDelete: (id: number) => http.Delete(`/databaseServer/${id}`), + serverDelete: (id: number) => http.Delete(`/database_server/${id}`), // 同步数据库 - serverSync: (id: number) => http.Post(`/databaseServer/${id}/sync`), + serverSync: (id: number) => http.Post(`/database_server/${id}/sync`), // 更新服务器备注 serverRemark: (id: number, remark: string) => - http.Put(`/databaseServer/${id}/remark`, { remark }), + http.Put(`/database_server/${id}/remark`, { remark }), // 获取数据库用户列表 - userList: (page: number, limit: number) => http.Get('/databaseUser', { params: { page, limit } }), + userList: (page: number, limit: number) => http.Get('/database_user', { params: { page, limit } }), // 创建数据库用户 - userCreate: (data: any) => http.Post('/databaseUser', data), + userCreate: (data: any) => http.Post('/database_user', data), // 获取数据库用户 - userGet: (id: number) => http.Get(`/databaseUser/${id}`), + userGet: (id: number) => http.Get(`/database_user/${id}`), // 更新数据库用户 - userUpdate: (id: number, data: any) => http.Put(`/databaseUser/${id}`, data), + userUpdate: (id: number, data: any) => http.Put(`/database_user/${id}`, data), // 删除数据库用户 - userDelete: (id: number) => http.Delete(`/databaseUser/${id}`), + userDelete: (id: number) => http.Delete(`/database_user/${id}`), // 更新用户备注 - userRemark: (id: number, remark: string) => http.Put(`/databaseUser/${id}/remark`, { remark }) + userRemark: (id: number, remark: string) => http.Put(`/database_user/${id}/remark`, { remark }) } diff --git a/web/src/api/panel/file/index.ts b/web/src/api/panel/file/index.ts index 6a89dd57..f4e5dc47 100644 --- a/web/src/api/panel/file/index.ts +++ b/web/src/api/panel/file/index.ts @@ -19,7 +19,7 @@ export default { copy: (paths: any[]): any => http.Post('/file/copy', paths), // 远程下载 remoteDownload: (path: string, url: string): any => - http.Post('/file/remoteDownload', { path, url }), + http.Post('/file/remote_download', { path, url }), // 获取文件信息 info: (path: string): any => http.Get('/file/info', { params: { path } }), // 修改文件权限 @@ -29,7 +29,7 @@ export default { compress: (dir: string, paths: string[], file: string): any => http.Post('/file/compress', { dir, paths, file }), // 解压文件 - unCompress: (file: string, path: string): any => http.Post('/file/unCompress', { file, path }), + unCompress: (file: string, path: string): any => http.Post('/file/un_compress', { file, path }), // 搜索文件 search: (path: string, keyword: string, sub: boolean, page: number, limit: number): any => http.Get('/file/search', { params: { path, keyword, sub, page, limit } }), diff --git a/web/src/api/panel/firewall/index.ts b/web/src/api/panel/firewall/index.ts index febcf161..c196fd03 100644 --- a/web/src/api/panel/firewall/index.ts +++ b/web/src/api/panel/firewall/index.ts @@ -14,11 +14,11 @@ export default { deleteRule: (rule: any): any => http.Delete('/firewall/rule', rule), // 获取防火墙IP规则 ipRules: (page: number, limit: number): any => - http.Get('/firewall/ipRule', { params: { page, limit } }), + http.Get('/firewall/ip_rule', { params: { page, limit } }), // 创建防火墙IP规则 - createIpRule: (rule: any): any => http.Post('/firewall/ipRule', rule), + createIpRule: (rule: any): any => http.Post('/firewall/ip_rule', rule), // 删除防火墙IP规则 - deleteIpRule: (rule: any): any => http.Delete('/firewall/ipRule', rule), + deleteIpRule: (rule: any): any => http.Delete('/firewall/ip_rule', rule), // 获取防火墙转发规则 forwards: (page: number, limit: number): any => http.Get('/firewall/forward', { params: { page, limit } }), diff --git a/web/src/api/panel/systemctl/index.ts b/web/src/api/panel/systemctl/index.ts index 3eff5911..be2f26cb 100644 --- a/web/src/api/panel/systemctl/index.ts +++ b/web/src/api/panel/systemctl/index.ts @@ -4,7 +4,7 @@ export default { // 服务状态 status: (service: string): any => http.Get('/systemctl/status', { params: { service } }), // 是否启用服务 - isEnabled: (service: string): any => http.Get('/systemctl/isEnabled', { params: { service } }), + isEnabled: (service: string): any => http.Get('/systemctl/is_enabled', { params: { service } }), // 启用服务 enable: (service: string): any => http.Post('/systemctl/enable', { service }), // 禁用服务 diff --git a/web/src/api/panel/user/index.ts b/web/src/api/panel/user/index.ts index a87ce82d..63d01837 100644 --- a/web/src/api/panel/user/index.ts +++ b/web/src/api/panel/user/index.ts @@ -13,7 +13,7 @@ export default { // 登出 logout: () => http.Post('/user/logout'), // 是否登录 - isLogin: () => http.Get('/user/isLogin'), + isLogin: () => http.Get('/user/is_login'), // 获取用户信息 info: () => http.Get('/user/info') } diff --git a/web/src/api/panel/website/index.ts b/web/src/api/panel/website/index.ts index 1100ed65..dd775c78 100644 --- a/web/src/api/panel/website/index.ts +++ b/web/src/api/panel/website/index.ts @@ -11,10 +11,10 @@ export default { // 伪静态 rewrites: (): any => http.Get(`/website/rewrites`), // 获取默认配置 - defaultConfig: (): any => http.Get('/website/defaultConfig'), + defaultConfig: (): any => http.Get('/website/default_config'), // 保存默认配置 saveDefaultConfig: (index: string, stop: string): any => - http.Post('/website/defaultConfig', { index, stop }), + http.Post('/website/default_config', { index, stop }), // 网站配置 config: (id: number): any => http.Get('/website/' + id), // 保存网站配置 @@ -23,11 +23,11 @@ export default { clearLog: (id: number): any => http.Delete('/website/' + id + '/log'), // 更新备注 updateRemark: (id: number, remark: string): any => - http.Post(`/website/${id}` + '/updateRemark', { remark }), + http.Post(`/website/${id}` + '/update_remark', { remark }), // 重置配置 - resetConfig: (id: number): any => http.Post(`/website/${id}/resetConfig`), + resetConfig: (id: number): any => http.Post(`/website/${id}/reset_config`), // 修改状态 status: (id: number, status: boolean): any => http.Post(`/website/${id}/status`, { status }), // 签发证书 - obtainCert: (id: number): any => http.Post(`/website/${id}/obtainCert`) + obtainCert: (id: number): any => http.Post(`/website/${id}/obtain_cert`) }