Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/Configuration/Advanced/Multitenancy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ to dynamically set a repository with schema files depending on the `appId`:
**cube.js:**

```javascript
const { FileRepository } = require('@cubejs-backend/server-core');

module.exports = {
contextToAppId: ({ securityContext }) =>
`CUBEJS_APP_${securityContext.appId}_${securityContext.userId}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pre-aggregations for them, if needed.
Our `cube.js` file will look like this:

```javascript
const FileRepository = require('@cubejs-backend/shared');
const { FileRepository } = require('@cubejs-backend/server-core');

module.exports = {
contextToAppId: ({ securityContext }) =>
Expand Down
2 changes: 1 addition & 1 deletion docs/content/Reference/Configuration/Config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ repositories with schema files based on
Called only once per [`appId`][self-opts-ctx-to-appid].

```javascript
const FileRepository = require('@cubejs-backend/shared');
const { FileRepository } = require('@cubejs-backend/server-core');

// using built-in SchemaFileRepository implementation and supplying the path to schema files
module.exports = {
Expand Down