コード例 #1
0
        public async Task <ActionResult <List <Device> > > GetDevicesAsync()
        {
            ExtractToken();
            if (accessTokenHeader != null)
            {
                var token = appUserTokensRepository.Get(accessTokenHeader);
                if (token != null)
                {
                    var devices = await devicesRepository.GetDevicesAsyncByUserId(token.AppUserId);

                    return(devices);
                }
            }
            return(Unauthorized());
        }