コード例 #1
0
        public async Task <IActionResult> Register([FromBody] FirebasePushChannelRegistration registration)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var config = await pushConfigurationManager.RegisterAsync(User.GetId(), registration);

            return(Ok(config));
        }
コード例 #2
0
        public async Task <IActionResult> Update(string configurationid, [FromBody] FirebasePushChannelRegistration registration)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            await pushConfigurationManager.UpdateAsync(User.GetId(), configurationid, registration);

            return(Ok());
        }