fix: UDM用户获取查询为空值情况

This commit is contained in:
TsMask
2023-12-22 12:23:08 +08:00
parent 1234c56af8
commit 89356af2c7
4 changed files with 12 additions and 10 deletions

View File

@@ -90,6 +90,11 @@ func (s *UDMSubController) Info(c *gin.Context) {
return
}
if len(data) == 0 {
c.JSON(200, result.ErrMsg("No Subs Data"))
return
}
// 解析返回的数据
cnType, _ := strconv.ParseInt(data["CNType"][:4], 0, 64)
rat, _ := strconv.ParseInt(data["RAT"][:4], 0, 64)