mirror of https://gitgud.io/fatchan/jschan.git
Close #478 option to hide banners and [banners] links board setting
parent
fd7fc1adbf
commit
35da2a9ff1
9 changed files with 40 additions and 5 deletions
@ -0,0 +1,21 @@ |
|||||||
|
'use strict'; |
||||||
|
|
||||||
|
module.exports = async(db, redis) => { |
||||||
|
console.log('add board option to hide banners and [banners] link, and globalsettings board default option'); |
||||||
|
await db.collection('globalsettings').updateOne({ _id: 'globalsettings' }, { |
||||||
|
'$set': { |
||||||
|
'boardDefaults.hideBanners': false, |
||||||
|
}, |
||||||
|
}); |
||||||
|
await db.collection('boards').updateMany({ |
||||||
|
'webring': false, |
||||||
|
}, { |
||||||
|
'$set':{ |
||||||
|
'settings.hideBanners': false, |
||||||
|
}, |
||||||
|
}); |
||||||
|
console.log('Clearing globalsettings cache'); |
||||||
|
await redis.deletePattern('globalsettings'); |
||||||
|
console.log('Clearing boards cache'); |
||||||
|
await redis.deletePattern('board:*'); |
||||||
|
}; |
Loading…
Reference in new issue