Add image page to return smaller images for UI

This commit is contained in:
Christian Bundy
2019-08-13 17:45:14 -07:00
parent 5f0e2d5cd1
commit 3b4fbc8bf9
10 changed files with 283 additions and 15 deletions

12
src/pages/models/blob.js Normal file
View File

@ -0,0 +1,12 @@
'use strict'
const cooler = require('./lib/cooler')
const debug = require('debug')('oasis')
module.exports = {
get: async ({ blobId }) => {
debug('requested blob: %s', blobId)
const ssb = await cooler.connect()
return cooler.read(ssb.blobs.get, blobId)
}
}