Commit ee0cc0ae authored by nanahira's avatar nanahira

change hints

parent 33ca8dd5
Pipeline #779 passed with stages
in 16 minutes and 18 seconds
...@@ -30,7 +30,7 @@ app.get('/user_avatar/ygobbs.com/:username/:size/:filename.png', async(req, res, ...@@ -30,7 +30,7 @@ app.get('/user_avatar/ygobbs.com/:username/:size/:filename.png', async(req, res,
{ 'Content-Type': 'image/png' } { 'Content-Type': 'image/png' }
).send(buffer); ).send(buffer);
} else { } else {
res.status(400).send(`Failed to fetch avatar.`); res.status(404).send(`Avatar not found.`);
} }
}); });
......
...@@ -99,7 +99,7 @@ export class Avatar { ...@@ -99,7 +99,7 @@ export class Avatar {
responseType: "arraybuffer" responseType: "arraybuffer"
})).data as Buffer; })).data as Buffer;
} catch (e) { } catch (e) {
console.error(`Error fetching original image of ${username} ${url}: ${e.toString()}`); console.error(`Error fetching original image of ${username} ${url} : ${e.toString()}`);
return null; return null;
} }
content = buffer.toString("base64"); content = buffer.toString("base64");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment