You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
295 B
JavaScript
11 lines
295 B
JavaScript
const router = require('express-promise-router')()
|
|
const db = require('../db')
|
|
|
|
router.get('/:uuid/:size', async (req, res) => {
|
|
const image = await db.item.getImage(req.params.uuid, req.params.size)
|
|
|
|
res.set('Content-Type', image.mime_type)
|
|
res.end(image.file)
|
|
})
|
|
|
|
module.exports = router |