Browse Source

Use instance not model for update

sbkwgh 7 năm trước cách đây
mục cha
commit
ffbc0f48a2
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      routes/user.js

+ 1 - 1
routes/user.js

@@ -250,7 +250,7 @@ router.post('/:username/picture', upload.single('picture'), async (req, res) =>
 					picture: '/api/v1/user/' + req.session.username + '/picture'
 				})
 			} else {
-				await ProfilePicture.update(pictureObj)
+				await picture.update(pictureObj)
 			}
 
 			res.json(user.toJSON())