Bit.Api.Controllers.DevicesController.GetByIdentifier C# (CSharp) Method

GetByIdentifier() private method

private GetByIdentifier ( string identifier ) : Task
identifier string
return Task
        public async Task<DeviceResponseModel> GetByIdentifier(string identifier)
        {
            var device = await _deviceRepository.GetByIdentifierAsync(identifier, new Guid(_userManager.GetUserId(User)));
            if(device == null)
            {
                throw new NotFoundException();
            }

            var response = new DeviceResponseModel(device);
            return response;
        }