移除被错误提交的测试用exe文件
修复前后端逻辑
This commit is contained in:
@@ -12,10 +12,6 @@ import (
|
||||
)
|
||||
|
||||
func PluginUserOnlineDevicesUsers(c *gin.Context) {
|
||||
if !service.IsPluginEnabled(service.PluginUserOnlineDevices) {
|
||||
Fail(c, 400, "plugin is not enabled")
|
||||
return
|
||||
}
|
||||
|
||||
page := parsePositiveInt(c.DefaultQuery("page", "1"), 1)
|
||||
perPage := parsePositiveInt(c.DefaultQuery("per_page", "20"), 20)
|
||||
@@ -92,10 +88,6 @@ func PluginUserOnlineDevicesUsers(c *gin.Context) {
|
||||
}
|
||||
|
||||
func PluginUserOnlineDevicesGetIP(c *gin.Context) {
|
||||
if !service.IsPluginEnabled(service.PluginUserOnlineDevices) {
|
||||
Fail(c, 400, "plugin is not enabled")
|
||||
return
|
||||
}
|
||||
|
||||
user, ok := currentUser(c)
|
||||
if !ok {
|
||||
@@ -138,10 +130,6 @@ func PluginUserOnlineDevicesGetIP(c *gin.Context) {
|
||||
}
|
||||
|
||||
func PluginUserAddIPv6Check(c *gin.Context) {
|
||||
if !service.IsPluginEnabled(service.PluginUserAddIPv6) {
|
||||
Fail(c, 400, "plugin is not enabled")
|
||||
return
|
||||
}
|
||||
|
||||
user, ok := currentUser(c)
|
||||
if !ok {
|
||||
@@ -171,10 +159,6 @@ func PluginUserAddIPv6Check(c *gin.Context) {
|
||||
}
|
||||
|
||||
func PluginUserAddIPv6Enable(c *gin.Context) {
|
||||
if !service.IsPluginEnabled(service.PluginUserAddIPv6) {
|
||||
Fail(c, 400, "plugin is not enabled")
|
||||
return
|
||||
}
|
||||
|
||||
user, ok := currentUser(c)
|
||||
if !ok {
|
||||
@@ -191,10 +175,6 @@ func PluginUserAddIPv6Enable(c *gin.Context) {
|
||||
}
|
||||
|
||||
func PluginUserAddIPv6SyncPassword(c *gin.Context) {
|
||||
if !service.IsPluginEnabled(service.PluginUserAddIPv6) {
|
||||
Fail(c, 400, "plugin is not enabled")
|
||||
return
|
||||
}
|
||||
|
||||
user, ok := currentUser(c)
|
||||
if !ok {
|
||||
@@ -234,41 +214,6 @@ func AdminSystemStatus(c *gin.Context) {
|
||||
})
|
||||
}
|
||||
|
||||
func AdminPluginsList(c *gin.Context) {
|
||||
var plugins []model.Plugin
|
||||
if err := database.DB.Order("id ASC").Find(&plugins).Error; err != nil {
|
||||
Fail(c, 500, "failed to fetch plugins")
|
||||
return
|
||||
}
|
||||
Success(c, plugins)
|
||||
}
|
||||
|
||||
func AdminPluginTypes(c *gin.Context) {
|
||||
Success(c, []string{"feature", "payment"})
|
||||
}
|
||||
|
||||
func AdminPluginIntegrationStatus(c *gin.Context) {
|
||||
Success(c, gin.H{
|
||||
"user_online_devices": gin.H{
|
||||
"enabled": service.IsPluginEnabled(service.PluginUserOnlineDevices),
|
||||
"status": "complete",
|
||||
"summary": "用户侧在线设备概览与后台设备监控已接入 Go 后端。",
|
||||
"endpoints": []string{"/api/v1/user/user-online-devices/get-ip", "/api/v1/" + service.GetAdminSecurePath() + "/user-online-devices/users"},
|
||||
},
|
||||
"real_name_verification": gin.H{
|
||||
"enabled": service.IsPluginEnabled(service.PluginRealNameVerification),
|
||||
"status": "complete",
|
||||
"summary": "实名状态查询、提交、后台审核与批量同步均已整合,并补齐 auto_approve/allow_resubmit_after_reject 行为。",
|
||||
"endpoints": []string{"/api/v1/user/real-name-verification/status", "/api/v1/user/real-name-verification/submit", "/api/v1/" + service.GetAdminSecurePath() + "/realname/records"},
|
||||
},
|
||||
"user_add_ipv6_subscription": gin.H{
|
||||
"enabled": service.IsPluginEnabled(service.PluginUserAddIPv6),
|
||||
"status": "integrated_with_runtime_sync",
|
||||
"summary": "用户启用、密码同步与运行时影子账号同步已接入;订单生命周期自动钩子仍依赖后续完整订单流重构。",
|
||||
"endpoints": []string{"/api/v1/user/user-add-ipv6-subscription/check", "/api/v1/user/user-add-ipv6-subscription/enable", "/api/v1/user/user-add-ipv6-subscription/sync-password"},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func parsePositiveInt(raw string, defaultValue int) int {
|
||||
value, err := strconv.Atoi(strings.TrimSpace(raw))
|
||||
|
||||
Reference in New Issue
Block a user