This repository has been archived on 2026-07-29. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
GoEdgeAPI/internal/db/models/nameservers/ns_domain_model_ext.go
T
2024-07-27 14:15:25 +08:00

22 lines
423 B
Go

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
}