diff options
author | Vitaly Takmazov | 2024-03-14 19:10:16 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2024-03-14 19:10:16 +0300 |
commit | 0e1f88d67d1b9c77a854a887da45a10994cf91f3 (patch) | |
tree | e51e7159b6568851d2c6a123e33eef0aa20fadb6 /vnext/server | |
parent | 9af545e76ce95a3b5a5be14310530716d1b8060f (diff) |
vnext: cleanup HMS
Diffstat (limited to 'vnext/server')
-rw-r--r-- | vnext/server/hms.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/vnext/server/hms.js b/vnext/server/hms.js index 14f69236..4945fe2a 100644 --- a/vnext/server/hms.js +++ b/vnext/server/hms.js @@ -13,9 +13,7 @@ const refreshToken = async () => { params.append('client_secret', client_secret) const res = await axios.post('https://oauth-login.cloud.huawei.com/oauth2/v3/token', params).catch(console.log) try { - log(`HMS response: ${JSON.stringify(res.data)}`) const access = res.data - log(`HMS access token: ${access.access_token}`) return access.access_token } catch (error) { log(error) @@ -27,8 +25,7 @@ const refreshToken = async () => { export const send = async (msg, tokenList = []) => { const adminToken = await refreshToken() - console.log(`admin token: ${adminToken}, tokenlist: ${tokenList}`) - if (adminToken) { + if (adminToken && tokenList.length > 0) { const payload = { 'message': msg } |