limit to requested remote

This commit is contained in:
Joey Hess 2019-03-05 15:56:28 -04:00
parent 354aafce1a
commit 3c652e1499
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -83,7 +83,10 @@ recordContentIdentifier h u cid k = queueDb h $ do
getContentIdentifiers :: ContentIdentifierHandle -> UUID -> Key -> IO [ContentIdentifier]
getContentIdentifiers (ContentIdentifierHandle h) u k = H.queryDbQueue h $ do
l <- selectList [ContentIdentifiersKey ==. toSKey k] []
l <- selectList
[ ContentIdentifiersKey ==. toSKey k
, ContentIdentifiersRemote ==. u
] []
return $ map (contentIdentifiersCid . entityVal) l
getContentIdentifierKeys :: ContentIdentifierHandle -> UUID -> ContentIdentifier -> IO [Key]