Skip to content

Commit

Permalink
fix(server): add list tenants
Browse files Browse the repository at this point in the history
  • Loading branch information
jrea committed Aug 15, 2024
1 parent 9999715 commit 9b96314
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/server/src/tenants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,14 @@ export default class Tenants extends Config {
const _init = this.handleHeaders(init);
return _requester.get(req, this.tenantUrl, _init);
};

get tenantListUrl() {
return `/users/${this.userId ?? '{userId}'}/tenants`;
}

listTenants = async (req: NileRequest<void>, init?: RequestInit) => {
const _requester = new Requester(this);
const _init = this.handleHeaders(init);
return _requester.get(req, this.tenantListUrl, _init);
};
}
1 change: 1 addition & 0 deletions packages/server/src/tenants/tenants.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const baseConfig = [
'databaseId',
'databaseName',
'user',
'listTenants',
'configure',
'password',
];
Expand Down

0 comments on commit 9b96314

Please sign in to comment.