@veritree/services 2.7.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/endpoints/subsites.js +19 -3
package/package.json
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
|
-
import Api from
|
|
1
|
+
import Api from '../helpers/api';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
class SubsitesApi extends Api {
|
|
4
|
+
constructor(resource) {
|
|
5
|
+
super(resource);
|
|
6
|
+
this.resource = 'subsites';
|
|
7
|
+
}
|
|
4
8
|
|
|
5
|
-
|
|
9
|
+
locationsByOrg() {
|
|
10
|
+
const get = async (args) => {
|
|
11
|
+
const url = `${this.getUrl()}/locations-by-org${this.getUrlParams(args)}`;
|
|
12
|
+
return await this.get(url);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
get,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const Subsites = new SubsitesApi();
|