MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / submitHuaweiAppUpdate

Function submitHuaweiAppUpdate

main.js:1694–1714  ·  view source on GitHub ↗
(accessToken)

Source from the content-addressed store, hash-verified

1692}
1693
1694async function submitHuaweiAppUpdate (accessToken) {
1695 try {
1696 const apiUrl = 'https://connect-api.cloud.huawei.com/api/publish/v2/app-submit' +
1697 '?appId=' + settings.huawei.app_id;
1698 const response = await postHttp(apiUrl, info, false, {
1699 headers: {
1700 'client_id': settings.huawei.client_id,
1701 'Authorization': 'Bearer ' + accessToken,
1702 'User-Agent': 'Telegram-X-Publisher'
1703 }
1704 });
1705 if (response.statusCode !== 200) {
1706 console.error('AGC update langauge info failed', response.statusCode, response.statusMessage, response.contentType, response.content);
1707 return null;
1708 }
1709 return JSON.parse(response.content);
1710 } catch (e) {
1711 console.error('Unable to submit AGC app for review', e);
1712 return null;
1713 }
1714}
1715
1716function uploadToHuaweiAppGallery (task, build, onDone, draftOnly) {
1717 (async () => {

Callers 1

uploadToHuaweiAppGalleryFunction · 0.85

Calls 1

postHttpFunction · 0.85

Tested by

no test coverage detected