[lint] linting
This commit is contained in:
@@ -76,7 +76,7 @@ module.exports = (sequelize, DataTypes) => {
|
||||
cc: follower || [],
|
||||
content,
|
||||
summary: null,
|
||||
sensitive: false,
|
||||
sensitive: false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,5 +10,5 @@ module.exports = (sequelize, DataTypes) => {
|
||||
}
|
||||
}, {})
|
||||
|
||||
return event_notification
|
||||
return event_notification
|
||||
}
|
||||
|
||||
@@ -6,8 +6,9 @@ module.exports = (sequelize, DataTypes) => {
|
||||
},
|
||||
object: DataTypes.JSON
|
||||
}, {})
|
||||
fed_users.associate = function(models) {
|
||||
fed_users.associate = function (models) {
|
||||
fed_users.belongsTo(models.instances)
|
||||
// associations can be defined here
|
||||
};
|
||||
}
|
||||
return fed_users
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ let sequelize = null
|
||||
|
||||
try {
|
||||
sequelize = new Sequelize(config.db)
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
consola.warn(` ⚠️ Cannot connect to db, check your configuration => ${e}`)
|
||||
process.exit(-1)
|
||||
}
|
||||
|
||||
15
server/api/models/instances.js
Normal file
15
server/api/models/instances.js
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict'
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
const instances = sequelize.define('instances', {
|
||||
domain: DataTypes.STRING,
|
||||
name: DataTypes.STRING,
|
||||
blocked: DataTypes.BOOLEAN,
|
||||
data: DataTypes.JSON
|
||||
}, {})
|
||||
|
||||
instances.associate = function (models) {
|
||||
instances.hasMany(models.fed_users)
|
||||
}
|
||||
|
||||
return instances
|
||||
}
|
||||
@@ -7,7 +7,7 @@ module.exports = (sequelize, DataTypes) => {
|
||||
index: true,
|
||||
primaryKey: true
|
||||
},
|
||||
weigth: { type: DataTypes.INTEGER, defaultValue: 0, allowNull: false },
|
||||
weigth: { type: DataTypes.INTEGER, defaultValue: 0, allowNull: false }
|
||||
}, {})
|
||||
|
||||
tag.associate = function (models) {
|
||||
|
||||
@@ -27,7 +27,7 @@ module.exports = (sequelize, DataTypes) => {
|
||||
recover_code: DataTypes.STRING,
|
||||
is_admin: DataTypes.BOOLEAN,
|
||||
is_active: DataTypes.BOOLEAN,
|
||||
rsa: DataTypes.JSON,
|
||||
rsa: DataTypes.JSON
|
||||
}, {
|
||||
scopes: {
|
||||
withoutPassword: {
|
||||
|
||||
Reference in New Issue
Block a user