Another batch of important updates and fixes
This commit is contained in:
@@ -12,6 +12,15 @@ exports.listComments = async (req, res) => {
|
||||
}
|
||||
|
||||
if (filters.ctxType === 'entry_dict_int') {
|
||||
if (!filters.ctxId) {
|
||||
const NO_COMMENTS_OBJECT = {
|
||||
page: 1,
|
||||
numberOfAllPages: 1,
|
||||
comments: [],
|
||||
commentCount: 0
|
||||
}
|
||||
return res.send(NO_COMMENTS_OBJECT)
|
||||
}
|
||||
const { dictionary_id: dictionaryId } = await Entry.fetch(filters.ctxId)
|
||||
const isEditor = req.user.hasAnyDictionaryRole(dictionaryId)
|
||||
const isPortalAdmin = req.user.hasRole('portal admin')
|
||||
|
||||
Reference in New Issue
Block a user