feat: add all other missing objects to init_data (#1407)

* Add all other missing objects to init_data.json

* Format golang code

* feat: add all other missing objects to init_data

* feat: add all other missing objects to init_data
This commit is contained in:
Liu
2022-12-18 01:49:42 +08:00
committed by GitHub
parent 48a0c8473f
commit 26acece8af
3 changed files with 347 additions and 0 deletions

View File

@ -169,6 +169,10 @@ func GetToken(id string) *Token {
return getToken(owner, name)
}
func (token *Token) GetId() string {
return fmt.Sprintf("%s/%s", token.Owner, token.Name)
}
func UpdateToken(id string, token *Token) bool {
owner, name := util.GetOwnerAndNameFromId(id)
if getToken(owner, name) == nil {