Update backend/src/api/bitcoin/bitcoin.routes.ts

This commit is contained in:
softsimon 2022-07-27 23:33:18 +02:00 committed by GitHub
parent a9248a5f13
commit b0fe879503
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -474,7 +474,7 @@ class BitcoinRoutes {
private async getRawBlock(req: Request, res: Response) { private async getRawBlock(req: Request, res: Response) {
try { try {
const result = await bitcoinApi.$getRawBlock(req.params.hash); const result = await bitcoinApi.$getRawBlock(req.params.hash);
res.setHeader('content-type', 'text/plain'); res.setHeader('content-type', 'application/octet-stream');
res.send(result); res.send(result);
} catch (e) { } catch (e) {
res.status(500).send(e instanceof Error ? e.message : e); res.status(500).send(e instanceof Error ? e.message : e);