From 0999302d99156200ff174d5ec56d6831c8afd332 Mon Sep 17 00:00:00 2001 From: Jannik Schönartz Date: Thu, 7 Mar 2019 19:20:25 +0000 Subject: [server] New clients are automaticly added to the groups of the fitting subranges Add conflict models Sequelize string operators depricated fix IPv4 is now saved as decimal in the database Add host to config instead of hardcoding Rename ip.js lib to iphelper.js --- server/api/users.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/api/users.js') diff --git a/server/api/users.js b/server/api/users.js index c4d9a2f..744ffc6 100644 --- a/server/api/users.js +++ b/server/api/users.js @@ -89,7 +89,7 @@ router.postAsync(['/', '/:id'], async (req, res) => { if (!authentication.validateUsername(username)) return res.status(400).send({ error: 'INVALID_USERNAME', message: 'Username does not fullfill the requirements. (No whitespaces)' }) // Check if the username already exists. - let userDb = await db.user.findOne({ where: { username: username, id: { $not: id } } }) + let userDb = await db.user.findOne({ where: { username: username, id: { [db.Op.not]: id } } }) if (userDb) return res.status(400).send({ error: 'USER_ALREADY_EXISTS', message: 'The provided username already exists.' }) userinfo.username = username } -- cgit v1.2.3-55-g7522