I would like to add the below query condition in my “service/players” get userModel.findAll()...
select * from user where privilege =‘ADMIN’ or privilege = ‘PLAYER’
The below query just returns only PLAYER.
app.get('/service/players', async (req, res) => {
try {
const players = await UserModel.findAll({ where: { privilege: 'PLAYER' } });
res.status(200).json({ players });
} catch (e) {
res.status(500).json({ message: e.message });
}
});