mirror of
https://github.com/harness/drone.git
synced 2025-05-04 01:49:29 +08:00
unmarshal repos from raw json message
This commit is contained in:
parent
bbaee080c9
commit
4b7f52ad8a
@ -18,6 +18,7 @@
|
||||
package license
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strings"
|
||||
|
||||
"github.com/drone/drone/core"
|
||||
@ -77,5 +78,12 @@ func Load(path string) (*core.License, error) {
|
||||
license.Licensor = decoded.Cus
|
||||
license.Subscription = decoded.Sub
|
||||
license.Users = int64(decoded.Lim)
|
||||
|
||||
if decoded.Dat != nil {
|
||||
dat := new(core.License)
|
||||
json.Unmarshal(decoded.Dat, dat)
|
||||
license.Repos = dat.Repos
|
||||
}
|
||||
|
||||
return license, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user