mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-29 19:40:25 +08:00
优化代码
This commit is contained in:
@@ -1 +1,20 @@
|
||||
package nameservers
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
|
||||
)
|
||||
|
||||
func (this *NSDomain) DecodeGroupIds() []int64 {
|
||||
if models.IsNull(this.GroupIds) {
|
||||
return nil
|
||||
}
|
||||
|
||||
var result = []int64{}
|
||||
err := json.Unmarshal(this.GroupIds, &result)
|
||||
if err != nil {
|
||||
remotelogs.Error("NSDomain", "DecodeGroupIds:"+err.Error())
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user