admin settings fix #12, fix #13 image in mastodon

This commit is contained in:
lesion
2019-03-12 01:16:52 +01:00
parent 9702f93cf9
commit c5989fa8b4
23 changed files with 232 additions and 85 deletions

View File

@@ -30,10 +30,13 @@ const Notification = db.define('notification', {
remove_code: Sequelize.STRING,
type: {
type: Sequelize.ENUM,
values: ['mail', 'admin_mail', 'activity_pub']
values: ['mail', 'admin_mail', 'mastodon']
}
})
Notification.findOrCreate({ where: { type: 'mastodon' } })
Notification.findOrCreate({ where: { type: 'admin_email' } })
const Place = db.define('place', {
name: { type: Sequelize.STRING, unique: true, index: true },
address: { type: Sequelize.STRING }

9
app/models/settings.js Normal file
View File

@@ -0,0 +1,9 @@
const db = require('../db')
const Sequelize = require('sequelize')
const Settings = db.define('settings', {
key: { type: Sequelize.STRING, primaryKey: true, index: true },
value: Sequelize.JSON
})
module.exports = Settings

View File

@@ -13,7 +13,6 @@ const User = db.define('user', {
password: Sequelize.STRING,
is_admin: Sequelize.BOOLEAN,
is_active: Sequelize.BOOLEAN,
mastodon_instance: Sequelize.STRING,
mastodon_auth: Sequelize.JSON
})