public async Task <bool> UpdatePushChannelAsync(UpdatePushChannel command)
        {
            var url      = urlBuilder.UpdatePushChannel();
            var response = await url.WithOAuthBearerToken(authToken).PutJsonAsync(command);

            return(response.IsSuccessStatusCode);
        }
예제 #2
0
        private async Task UpdatePushChannelAsync(string newPushChannel)
        {
            if (newPushChannel == null)
            {
                return;
            }

            await RequestTokenIfNeededAsync();

            var command = new UpdatePushChannel();

            command.UserId      = secureStorage.UserId;
            command.PushChannel = newPushChannel;

            try
            {
                bool updated = await client.UpdatePushChannelAsync(command);

                AppSettings.Instance.IsChannelUpdated = updated;
            }
            catch (Exception ex)
            {
                AppSettings.Instance.IsChannelUpdated = false;
            }
        }
예제 #3
0
        public async Task <IActionResult> UpdatePushChannel([FromBody] UpdatePushChannel command)
        {
            await DispatchAsync(command);

            return(Ok());
        }