mirror of
https://framagit.org/les/gancio.git
synced 2025-02-01 00:52:01 +01:00
minor
This commit is contained in:
parent
26d293ed0f
commit
b55b3f42e1
2 changed files with 10 additions and 9 deletions
|
@ -36,7 +36,6 @@ module.exports = {
|
||||||
|
|
||||||
const db = require('./api/models')
|
const db = require('./api/models')
|
||||||
const User = require('./api/models/user')
|
const User = require('./api/models/user')
|
||||||
const Notification = require('./api/models/notification')
|
|
||||||
await db.authenticate()
|
await db.authenticate()
|
||||||
|
|
||||||
const users = await User.findAll()
|
const users = await User.findAll()
|
||||||
|
@ -55,7 +54,7 @@ module.exports = {
|
||||||
})
|
})
|
||||||
|
|
||||||
// add default notification
|
// add default notification
|
||||||
consola.info('Add default notification')
|
// consola.info('Add default notification')
|
||||||
|
|
||||||
// await db.announcement.create({
|
// await db.announcement.create({
|
||||||
// visible: true,
|
// visible: true,
|
||||||
|
@ -63,13 +62,15 @@ module.exports = {
|
||||||
// announcement: 'TODO: HTML First presentation post'
|
// announcement: 'TODO: HTML First presentation post'
|
||||||
// })
|
// })
|
||||||
|
|
||||||
// send confirmed events to mastodon
|
// try {
|
||||||
await Notification.create({ action: 'Create', type: 'ap', filters: '{ "is_visible": true }' })
|
|
||||||
await Notification.create({ action: 'Update', type: 'ap', filters: '{ "is_visible": true }' })
|
|
||||||
await Notification.create({ action: 'Delete', type: 'ap', filters: '{ "is_visible": true }' })
|
|
||||||
|
|
||||||
// send anon events to admin
|
// // send confirmed events to mastodon
|
||||||
await Notification.create({ action: 'Create', type: 'admin_email', filters: '{ "is_visible": false }' })
|
// await Notification.create({ action: 'Create', type: 'ap', filters: '{ "is_visible": true }' })
|
||||||
|
// await Notification.create({ action: 'Update', type: 'ap', filters: '{ "is_visible": true }' })
|
||||||
|
// await Notification.create({ action: 'Delete', type: 'ap', filters: '{ "is_visible": true }' })
|
||||||
|
// // send anon events to admin
|
||||||
|
// await Notification.create({ action: 'Create', type: 'admin_email', filters: '{ "is_visible": false }' })
|
||||||
|
// }
|
||||||
|
|
||||||
// TODO email's notifications
|
// TODO email's notifications
|
||||||
// await db.notification.create({ action: 'Create', type: 'email', filters: { is_visible: true } })
|
// await db.notification.create({ action: 'Create', type: 'email', filters: { is_visible: true } })
|
||||||
|
|
|
@ -11,7 +11,7 @@ module.exports = {
|
||||||
|
|
||||||
// send anon event to admin
|
// send anon event to admin
|
||||||
{ action: 'Create', type: 'admin_email', filters: '{ "is_visible": false }', createdAt: new Date(), updatedAt: new Date() }
|
{ action: 'Create', type: 'admin_email', filters: '{ "is_visible": false }', createdAt: new Date(), updatedAt: new Date() }
|
||||||
]).catch(e => { console.error(e) })
|
]).catch(e => { })
|
||||||
},
|
},
|
||||||
|
|
||||||
down: (queryInterface, Sequelize) => {
|
down: (queryInterface, Sequelize) => {
|
||||||
|
|
Loading…
Reference in a new issue