files null check
This commit is contained in:
parent
c44fb4ebfa
commit
a29f280af1
@ -90,6 +90,8 @@ class UserEndpoint extends ApiEndpoint {
|
||||
|
||||
async uploadAvatar (req: Request, res: Response): Promise<void> {
|
||||
const { user, files } = req;
|
||||
if (!files)
|
||||
return void res.status(400).send('Missing file');
|
||||
const { file } = files;
|
||||
|
||||
if (!file)
|
||||
|
Loading…
Reference in New Issue
Block a user