Skip to content

Commit

Permalink
fixup! Add context retrieval for reads via books-mf2
Browse files Browse the repository at this point in the history
  • Loading branch information
jamietanna committed Nov 16, 2021
1 parent 3801a2d commit 0862b4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/events/fetch-context/books-mf2.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ async function fetchContext (url) {
}
const mf2 = await response.json()
if (!('items' in mf2) || !mf2.items.length) return
return mf2.items[0].properties
const properties = mf2.items[0].properties
properties.url = [url]
return properties
}

module.exports = {
Expand Down

0 comments on commit 0862b4f

Please sign in to comment.