Fixed icon
This commit is contained in:
@@ -124,11 +124,11 @@ app.get('/api/position', asyncHandler(async (req, res) => {
|
||||
|
||||
// ── Icon ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
app.get('/api/icon/:icon', asyncHandler(async (req, res) => {
|
||||
app.get('/api/icon/:icon', asyncHandler(async (req, res, next) => {
|
||||
const { icon } = req.params;
|
||||
if(!icon) return next(); // 404 fallback can handle missing icons
|
||||
resp.contentType('image/png');
|
||||
resp.sendFile(await fetchIcon(icon));
|
||||
res.contentType('image/png');
|
||||
res.sendFile(await fetchIcon(icon));
|
||||
}));
|
||||
|
||||
// ── Space ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user