2018-06-28 22:16:48 +02:00
|
|
|
const logger = require('winston');
|
2018-06-30 05:34:48 +02:00
|
|
|
const db = require('../../../models');
|
2018-06-28 22:16:48 +02:00
|
|
|
|
|
|
|
const updateBlockedList = (req, res) => {
|
2018-06-30 05:34:48 +02:00
|
|
|
db.Blocked.refreshTable()
|
2018-06-28 22:16:48 +02:00
|
|
|
.then(data => {
|
|
|
|
logger.info('finished updating blocked content list');
|
|
|
|
res.status(200).json({
|
|
|
|
success: true,
|
|
|
|
data,
|
|
|
|
});
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
logger.error(error);
|
|
|
|
res.status(500).json({
|
|
|
|
success: false,
|
|
|
|
error,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = updateBlockedList;
|