commandcenter용 globalApiToken 추가
This commit is contained in:
@ -96,6 +96,7 @@ type maingateConfig struct {
|
||||
FirebaseAdminSDKCredentialFile string `json:"firebase_admin_sdk_credentialfile"`
|
||||
SteamAppId string `json:"steam_app_id"`
|
||||
SteamPublisherAuthKey string `json:"steam_publisher_authkey"`
|
||||
GlobalMaingateToken string `json:"maingate_api_token"`
|
||||
Firebase_Google_Analytics_JS_SDK_Config
|
||||
}
|
||||
|
||||
|
||||
@ -256,6 +256,12 @@ func (sh *serviceDescription) prepare(mg *Maingate) error {
|
||||
sh.updateUserinfo = mg.updateUserinfo
|
||||
sh.getProviderInfo = mg.getProviderInfo
|
||||
|
||||
if globalApiToken, err := primitive.ObjectIDFromHex(config.GlobalMaingateToken); err == nil {
|
||||
if !globalApiToken.IsZero() {
|
||||
sh.ServerApiTokens = append(sh.ServerApiTokens, globalApiToken)
|
||||
}
|
||||
}
|
||||
|
||||
sh.wl = &mg.wl
|
||||
sh.bl = &mg.bl
|
||||
sh.serviceSerialized, _ = json.Marshal(sh)
|
||||
|
||||
Reference in New Issue
Block a user