Added alert dialog. Fixed image rotation EXIT data being discarded.
This commit is contained in:
23
src/alerts.js
Normal file
23
src/alerts.js
Normal file
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
const knex = require('./knex');
|
||||
|
||||
async function addAlert(alert, user) {
|
||||
console.log(alert);
|
||||
const alertId = await knex('alerts').insert({
|
||||
user_id: user.id,
|
||||
notify: alert.notify,
|
||||
email: alert.notify,
|
||||
});
|
||||
|
||||
console.log(alertId);
|
||||
}
|
||||
|
||||
async function removeAlert(alertId) {
|
||||
await knex('alerts').where('id', alertId).delete();
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
addAlert,
|
||||
removeAlert,
|
||||
};
|
||||
Reference in New Issue
Block a user