mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix lazy static route with unknown avatars
This commit is contained in:
@@ -44,6 +44,8 @@ async function getAvatar (req: express.Request, res: express.Response) {
|
||||
}
|
||||
|
||||
const avatar = await AvatarModel.loadByName(filename)
|
||||
if (!avatar) return res.sendStatus(404)
|
||||
|
||||
if (avatar.onDisk === false) {
|
||||
if (!avatar.fileUrl) return res.sendStatus(404)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user