feat: add article management routes with search, detail, and referential data endpoints
This commit is contained in:
1 parent
ab8ed85c84
commit
f83a090cfb
1 file changed
+2
-1
@@ -347,7 +347,8 @@ router.get('/:id/photo', async (req, res) => {
|
||||
|
||||
res.setHeader('Content-Type', imgRes.headers.get('content-type') || 'image/jpeg');
|
||||
res.setHeader('Cache-Control', 'public, max-age=3600');
|
||||
imgRes.body.pipe(res);
|
||||
const { Readable } = require('stream');
|
||||
Readable.fromWeb(imgRes.body).pipe(res);
|
||||
} catch (err) {
|
||||
res.status(500).json({ error: err.message });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user