ADSB images

This commit is contained in:
2026-07-04 22:09:13 -04:00
parent 54c53a5822
commit be40d845bd
2 changed files with 2 additions and 1 deletions

View File

@@ -157,6 +157,7 @@ app.get('/api/icon/:icon', asyncHandler(async (req, res, next) => {
app.get('/api/adsb', asyncHandler(async (req, res) => res.json(await getADSB())));
app.get('/api/adsb-image/:icao', asyncHandler(async (req, res) => {
const blob = await getADSBImage(req.params.icao);
if (!blob) return res.status(404).send('No image found');
const buffer = Buffer.from(await blob.arrayBuffer());
res.contentType(blob.type).send(buffer);
}));