websockets implemented
This commit is contained in:
@@ -9,9 +9,11 @@ import UserRightType from '../models/type/user_right.js';
|
||||
|
||||
class BaseService {
|
||||
async getUserByHashedId(hashedId) {
|
||||
const user = await User.findOne({ where: { hashedId } });
|
||||
console.log('async getUserByHashedId: ', hashedId);
|
||||
const user = await User.findOne({ where: { hashedId: hashedId } });
|
||||
if (!user) {
|
||||
throw new Error('User not found');
|
||||
console.log('User not found: ', hashedId);
|
||||
throw new Error('User not found: ', hashedId);
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user