Fix: Prevent backend from returning empty data when site_uuid is all
This commit is contained in:
1 parent
350234d379
commit
cd93a40104
4 files changed
+25
-14
No files matched your search
@@ -14,11 +14,10 @@ router.get('/tenant-config', async (req, res) => {
|
||||
|
||||
if (isGlobalUser) {
|
||||
const requestedSiteUuid = req.headers['x-backone-site-uuid'];
|
||||
if (requestedSiteUuid) {
|
||||
if (requestedSiteUuid && requestedSiteUuid !== 'all') {
|
||||
siteUuid = requestedSiteUuid;
|
||||
}
|
||||
} else if (req.user?.site_uuid) {
|
||||
// For TENANT_ADMIN or other isolated roles, they only see their own site branding
|
||||
siteUuid = req.user.site_uuid;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user