Skip to content

Commit 9bd6f82

Browse files
committed
add getOrganization function
1 parent fde8dc4 commit 9bd6f82

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/accessControl.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,16 @@ AccessControl.prototype.customHeaders = function (customHeaders) {
159159
else return this._customHeaders;
160160
};
161161

162+
/**
163+
* -- TerminusDB API ---
164+
* Get an organization from the TerminusDB API.
165+
* @param {string} organization - The organization
166+
* @return {object} - organization
167+
*/
168+
AccessControl.prototype.getOrganization = function (org) {
169+
return this.dispatch(`${this.baseURL}/organizations/${org}`, CONST.GET);
170+
};
171+
162172
/**
163173
* -- TerminusDB API ---
164174
* This end point works in basic authentication, admin user

0 commit comments

Comments
 (0)