Channel Rank/Auth base backend functional
This commit is contained in:
parent
057537341a
commit
61fab57a6d
12 changed files with 318 additions and 83 deletions
|
|
@ -27,6 +27,8 @@ module.exports.channelValidator = {
|
|||
|
||||
thumbnail: (field = 'thumbnail') => accountValidator.img(field),
|
||||
|
||||
rank: (field = 'rank') => accountValidator.rank(field),
|
||||
|
||||
settingsMap: () => checkExact(checkSchema({
|
||||
'settingsMap.hidden': {
|
||||
optional: true,
|
||||
|
|
|
|||
|
|
@ -45,18 +45,6 @@ module.exports.permissionsValidator = {
|
|||
custom: {
|
||||
options: module.exports.isRank
|
||||
},
|
||||
},
|
||||
'permissionsMap.manageChannel': {
|
||||
optional: true,
|
||||
custom: {
|
||||
options: module.exports.isRank
|
||||
},
|
||||
},
|
||||
'permissionsMap.deleteChannel': {
|
||||
optional: true,
|
||||
custom: {
|
||||
options: module.exports.isRank
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue