fix: issue user's private fields such as password were returned

This commit is contained in:
Takeshi Kimata
2024-07-18 10:47:34 +09:00
parent aab9f91156
commit 7cafca93c3
3 changed files with 5 additions and 2 deletions

View File

@@ -31,6 +31,7 @@ module.exports = function (sequelize) {
const users = await User.findAll({
where,
attributes: ['id', 'email', 'username', 'role', 'avatarPath'],
limit: 7,
});
res.json(users);