(c *gin.Context)
| 37 | } |
| 38 | |
| 39 | func GetStatus(c *gin.Context) { |
| 40 | |
| 41 | cs := console_setting.GetConsoleSetting() |
| 42 | |
| 43 | data := gin.H{ |
| 44 | "version": common.Version, |
| 45 | "start_time": common.StartTime, |
| 46 | "email_verification": common.EmailVerificationEnabled, |
| 47 | "github_oauth": common.GitHubOAuthEnabled, |
| 48 | "github_client_id": common.GitHubClientId, |
| 49 | "linuxdo_oauth": common.LinuxDOOAuthEnabled, |
| 50 | "linuxdo_client_id": common.LinuxDOClientId, |
| 51 | "telegram_oauth": common.TelegramOAuthEnabled, |
| 52 | "telegram_bot_name": common.TelegramBotName, |
| 53 | "system_name": common.SystemName, |
| 54 | "logo": common.Logo, |
| 55 | "footer_html": common.Footer, |
| 56 | "wechat_qrcode": common.WeChatAccountQRCodeImageURL, |
| 57 | "wechat_login": common.WeChatAuthEnabled, |
| 58 | "server_address": setting.ServerAddress, |
| 59 | "price": setting.Price, |
| 60 | "stripe_unit_price": setting.StripeUnitPrice, |
| 61 | "min_topup": setting.MinTopUp, |
| 62 | "stripe_min_topup": setting.StripeMinTopUp, |
| 63 | "turnstile_check": common.TurnstileCheckEnabled, |
| 64 | "turnstile_site_key": common.TurnstileSiteKey, |
| 65 | "top_up_link": common.TopUpLink, |
| 66 | "docs_link": operation_setting.GetGeneralSetting().DocsLink, |
| 67 | "quota_per_unit": common.QuotaPerUnit, |
| 68 | "display_in_currency": common.DisplayInCurrencyEnabled, |
| 69 | "enable_batch_update": common.BatchUpdateEnabled, |
| 70 | "enable_drawing": common.DrawingEnabled, |
| 71 | "enable_task": common.TaskEnabled, |
| 72 | "enable_data_export": common.DataExportEnabled, |
| 73 | "data_export_default_time": common.DataExportDefaultTime, |
| 74 | "default_collapse_sidebar": common.DefaultCollapseSidebar, |
| 75 | "enable_online_topup": setting.PayAddress != "" && setting.EpayId != "" && setting.EpayKey != "", |
| 76 | "enable_stripe_topup": setting.StripeApiSecret != "" && setting.StripeWebhookSecret != "" && setting.StripePriceId != "", |
| 77 | "mj_notify_enabled": setting.MjNotifyEnabled, |
| 78 | "chats": setting.Chats, |
| 79 | "demo_site_enabled": operation_setting.DemoSiteEnabled, |
| 80 | "self_use_mode_enabled": operation_setting.SelfUseModeEnabled, |
| 81 | "default_use_auto_group": setting.DefaultUseAutoGroup, |
| 82 | "pay_methods": setting.PayMethods, |
| 83 | "usd_exchange_rate": setting.USDExchangeRate, |
| 84 | |
| 85 | // 面板启用开关 |
| 86 | "api_info_enabled": cs.ApiInfoEnabled, |
| 87 | "uptime_kuma_enabled": cs.UptimeKumaEnabled, |
| 88 | "announcements_enabled": cs.AnnouncementsEnabled, |
| 89 | "faq_enabled": cs.FAQEnabled, |
| 90 | |
| 91 | "oidc_enabled": system_setting.GetOIDCSettings().Enabled, |
| 92 | "oidc_client_id": system_setting.GetOIDCSettings().ClientId, |
| 93 | "oidc_authorization_endpoint": system_setting.GetOIDCSettings().AuthorizationEndpoint, |
| 94 | "setup": constant.Setup, |
| 95 | } |
| 96 |
nothing calls this directly
no test coverage detected