websockets implemented

This commit is contained in:
Torsten Schulz
2024-12-04 19:08:26 +01:00
parent d46a51db38
commit 069c97fa90
64 changed files with 2488 additions and 562 deletions

View File

@@ -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;
}