mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-09 11:40:25 +08:00
用户系统可以切换CDN和智能DNS
This commit is contained in:
@@ -1 +1,21 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/remotelogs"
|
||||
)
|
||||
|
||||
// DecodeModules 解析模块
|
||||
func (this *User) DecodeModules() []string {
|
||||
if len(this.Modules) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var result = []string{}
|
||||
err := json.Unmarshal(this.Modules, &result)
|
||||
if err != nil {
|
||||
remotelogs.Error("User.DecodeModules", err.Error())
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user