diff --git a/src/server/endpoints/api/User.ts b/src/server/endpoints/api/User.ts index 5796a1c..e368714 100644 --- a/src/server/endpoints/api/User.ts +++ b/src/server/endpoints/api/User.ts @@ -90,6 +90,8 @@ class UserEndpoint extends ApiEndpoint { async uploadAvatar (req: Request, res: Response): Promise { const { user, files } = req; + if (!files) + return void res.status(400).send('Missing file'); const { file } = files; if (!file)