From 0e1f88d67d1b9c77a854a887da45a10994cf91f3 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 14 Mar 2024 19:10:16 +0300 Subject: vnext: cleanup HMS --- vnext/server/hms.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'vnext') 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 } -- cgit v1.2.3