mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 10:35:55 +01:00
feat: add isACP to config, closes #12623
This commit is contained in:
@@ -94,6 +94,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isACP:
|
||||
type: boolean
|
||||
description: true if admin page is being loaded, false otherwise
|
||||
cache-buster:
|
||||
type: string
|
||||
topicPostSort:
|
||||
|
||||
@@ -67,6 +67,7 @@ apiController.loadConfig = async function (req) {
|
||||
userLang: req.query.lang ? validator.escape(String(req.query.lang)) : (meta.config.defaultLang || 'en-GB'),
|
||||
loggedIn: !!req.user,
|
||||
uid: req.uid,
|
||||
isACP: !!(req.res && req.res.locals && req.res.locals.renderAdminHeader),
|
||||
'cache-buster': meta.config['cache-buster'] || '',
|
||||
topicPostSort: meta.config.topicPostSort || 'oldest_to_newest',
|
||||
categoryTopicSort: meta.config.categoryTopicSort || 'recently_replied',
|
||||
|
||||
Reference in New Issue
Block a user