Esempio n. 1
0
        public async Task <IActionResult> SubscribePushTokenAsync([FromBody] PushTokenRequest model)
        {
            var userId = GetCurrentSaasUserId();

            var token = model.Token.Trim().Replace(" ", string.Empty);

            await _pushNotificationService.CreateOrUpdatePushSubscriptionAsync(new CreatePushTokenRequest(userId)
            {
                Token          = token,
                DevicePlatform = model.DevicePlatform
            });

            return(Ok());
        }