mirror of
https://github.com/elyby/chrly.git
synced 2025-05-31 14:11:51 +05:30
Конфиг Accounts API вынесен в параметры окружения
This commit is contained in:
@@ -5,6 +5,8 @@ import (
|
||||
"elyby/minecraft-skinsystem/lib/external/accounts"
|
||||
)
|
||||
|
||||
var AccountsTokenConfig *accounts.TokenRequest
|
||||
|
||||
var token *accounts.Token
|
||||
|
||||
const repeatsLimit = 3
|
||||
@@ -40,13 +42,7 @@ func _getByField(field string, value string) (accounts.AccountInfoResponse, erro
|
||||
|
||||
func getToken() (*accounts.Token, error) {
|
||||
if token == nil {
|
||||
tempToken, err := accounts.GetToken(accounts.TokenRequest{
|
||||
Id: "skinsystem",
|
||||
Secret: "qugFIaCjec3LMA",
|
||||
Scopes: []string{
|
||||
"internal_account_info",
|
||||
},
|
||||
})
|
||||
tempToken, err := accounts.GetToken(*AccountsTokenConfig)
|
||||
if err != nil {
|
||||
return &accounts.Token{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user