Verschieden Settings hinzugefügt (inkomplett)
This commit is contained in:
@@ -28,11 +28,9 @@ const UserParam = sequelize.define('user_param', {
|
||||
if (value) {
|
||||
try {
|
||||
const iv = generateIv();
|
||||
console.log(value);
|
||||
this.setDataValue('iv', iv.toString('hex'));
|
||||
this.setDataValue('value', encrypt(value, iv));
|
||||
this.setDataValue('value', encrypt(value.toString(), iv));
|
||||
} catch (error) {
|
||||
console.log('Error setting value:', error);
|
||||
this.setDataValue('value', '');
|
||||
}
|
||||
}
|
||||
@@ -43,7 +41,6 @@ const UserParam = sequelize.define('user_param', {
|
||||
const iv = Buffer.from(this.getDataValue('iv'), 'hex');
|
||||
return decrypt(value, iv);
|
||||
} catch (error) {
|
||||
console.log('Error getting value:', error);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
import User from './community/user.js';
|
||||
import UserParam from './community/user_param.js';
|
||||
import UserParamType from './type/user_param.js';
|
||||
import Login from './logs/login.js';
|
||||
import UserRightType from './type/user_right.js';
|
||||
import UserRight from './community/user_right.js';
|
||||
import SettingsType from './type/settings.js';
|
||||
import UserParamValue from './type/user_param_value.js';
|
||||
import UserParamType from './type/user_param.js';
|
||||
import UserRightType from './type/user_right.js';
|
||||
import User from './community/user.js';
|
||||
import UserParam from './community/user_param.js';
|
||||
import Login from './logs/login.js';
|
||||
import UserRight from './community/user_right.js';
|
||||
|
||||
const models = {
|
||||
User,
|
||||
UserParam,
|
||||
UserParamType,
|
||||
Login,
|
||||
UserRightType,
|
||||
UserRight,
|
||||
SettingsType,
|
||||
UserParamValue,
|
||||
UserParamType,
|
||||
UserRightType,
|
||||
User,
|
||||
UserParam,
|
||||
Login,
|
||||
UserRight,
|
||||
};
|
||||
|
||||
export default models;
|
||||
|
||||
Reference in New Issue
Block a user