mirror of https://gitgud.io/fatchan/jschan.git
Draft: Add modlog on unban, and split concept of private/public modlog entries See merge request fatchan/jschan!345
commit
8c1e56f016
34 changed files with 197 additions and 45 deletions
@ -0,0 +1,12 @@ |
||||
'use strict'; |
||||
|
||||
module.exports = async(db) => { |
||||
|
||||
console.log('Updating modlogs to add public flag'); |
||||
await db.collection('modlog').updateMany({}, { |
||||
'$set': { |
||||
'public': true, |
||||
}, |
||||
}); |
||||
|
||||
}; |
@ -0,0 +1,24 @@ |
||||
'use strict'; |
||||
|
||||
module.exports = async(db) => { |
||||
|
||||
console.log('Updating all bans to have new global true/false flag'); |
||||
await db.collection('bans').updateMany({ |
||||
board: null, |
||||
}, { |
||||
'$set': { |
||||
'global': true, |
||||
}, |
||||
}); |
||||
|
||||
await db.collection('bans').updateMany({ |
||||
board: { |
||||
'$ne': null, |
||||
}, |
||||
}, { |
||||
'$set': { |
||||
'global': false, |
||||
}, |
||||
}); |
||||
|
||||
}; |
@ -1,2 +1,6 @@ |
||||
mixin postlink(log, postLink, manageLink=false) |
||||
a.quote(href=`/${postLink.board || log.board}/${manageLink ? 'manage/' : ''}thread/${postLink.thread || postLink.postId}.html#${postLink.postId}`) >>#{postLink.postId} |
||||
if postLink.thread || postLink.postId |
||||
a.quote(href=`/${postLink.board || log.board}/${manageLink ? 'manage/' : ''}thread/${postLink.thread || postLink.postId}.html#${postLink.postId}`) >>#{postLink.postId} |
||||
else |
||||
a.quote(href=`/${postLink.board || log.board}/${manageLink ? 'manage/' : ''}index.html`) >>>/#{postLink.board}/ |
||||
|
||||
|
Loading…
Reference in new issue