From dd4c3e05d30a093ec821a23f659123754b69d838 Mon Sep 17 00:00:00 2001 From: HFO4 <912394456@qq.com> Date: Sun, 13 Mar 2022 16:21:32 +0800 Subject: [PATCH] Feat: show pro flag in ping response --- routers/controllers/site.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routers/controllers/site.go b/routers/controllers/site.go index f74534d..b066397 100644 --- a/routers/controllers/site.go +++ b/routers/controllers/site.go @@ -42,9 +42,14 @@ func SiteConfig(c *gin.Context) { // Ping 状态检查页面 func Ping(c *gin.Context) { + version := conf.BackendVersion + if conf.IsPro == "true" { + version += "-pro" + } + c.JSON(200, serializer.Response{ Code: 0, - Data: conf.BackendVersion, + Data: conf.BackendVersion + conf.IsPro, }) }