fix #17 fix #36 remove notification, rss fix&more

This commit is contained in:
lesion
2019-03-21 22:20:30 +01:00
parent ba0004a89f
commit 58f0d8c9fe
30 changed files with 302 additions and 123 deletions

View File

@@ -34,9 +34,6 @@ const Notification = db.define('notification', {
}
})
Notification.findOrCreate({ where: { type: 'mastodon', filters: { is_visible: true } } })
Notification.findOrCreate({ where: { type: 'admin_email', filters: { is_visible: false } } })
const Place = db.define('place', {
name: { type: Sequelize.STRING, unique: true, index: true },
address: { type: Sequelize.STRING }
@@ -66,4 +63,10 @@ Event.belongsTo(Place)
User.hasMany(Event)
Place.hasMany(Event)
async function init () {
await Notification.findOrCreate({ where: { type: 'mastodon', filters: { is_visible: true } } })
await Notification.findOrCreate({ where: { type: 'admin_email', filters: { is_visible: false } } })
}
init()
module.exports = { Event, Comment, Tag, Place, Notification, EventNotification }

View File

@@ -11,6 +11,7 @@ const User = db.define('user', {
},
description: Sequelize.TEXT,
password: Sequelize.STRING,
recover_code: Sequelize.STRING,
is_admin: Sequelize.BOOLEAN,
is_active: Sequelize.BOOLEAN,
mastodon_auth: Sequelize.JSON