mirror of https://gitgud.io/fatchan/jschan.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
860 B
34 lines
860 B
'use strict';
|
|
|
|
module.exports = async(db, redis) => {
|
|
console.log('Updating edited posts username property for "hidden users" to support localisation');
|
|
await db.collection('posts').updateMany({
|
|
'edited.username': 'Hidden User',
|
|
}, {
|
|
'$set': {
|
|
'edited.username': null,
|
|
},
|
|
});
|
|
console.log('Updating db for language settings');
|
|
await db.collection('globalsettings').updateOne({ _id: 'globalsettings' }, {
|
|
'$set': {
|
|
'language': 'en-GB',
|
|
},
|
|
});
|
|
await db.collection('boards').updateMany({}, {
|
|
'$set': {
|
|
'settings.language': 'en-GB',
|
|
},
|
|
});
|
|
await db.collection('modlog').updateMany({
|
|
'actions': 'Edit',
|
|
}, {
|
|
'$set': {
|
|
'actions': ['Edit'],
|
|
},
|
|
});
|
|
console.log('Clearing globalsettings cache');
|
|
await redis.deletePattern('globalsettings');
|
|
console.log('Clearing boards cache');
|
|
await redis.deletePattern('board:*');
|
|
};
|
|
|