@veritree/services 0.1.0 → 0.1.1
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/services/orgs.js +4 -3
- package/src/services/sponsors.js +2 -0
package/package.json
CHANGED
package/src/services/orgs.js
CHANGED
|
@@ -3,16 +3,17 @@ import Api from '../helpers/api';
|
|
|
3
3
|
export const createOrgsApiService = (orgId, orgType) => {
|
|
4
4
|
if (!orgId && !orgType) throw new Error('No org id and/or type provided');
|
|
5
5
|
const resource = 'orgs';
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
// filter for stats data
|
|
7
8
|
const stats = {
|
|
8
9
|
async get(isPublic) {
|
|
9
|
-
const endpoint =
|
|
10
|
+
const endpoint = _getStatsEndpoint(isPublic);
|
|
10
11
|
const url = _getUrl(endpoint);
|
|
11
12
|
return await Api.get(url);
|
|
12
13
|
},
|
|
13
14
|
};
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
const _getStatsEndpoint = (isPublic) => {
|
|
16
17
|
return isPublic ? 'pstats' : 'stats';
|
|
17
18
|
}
|
|
18
19
|
|
package/src/services/sponsors.js
CHANGED
|
@@ -4,6 +4,7 @@ export const createSponsorsApiService = (orgId) => {
|
|
|
4
4
|
if (!orgId) throw new Error('No org id provided');
|
|
5
5
|
const resource = 'sponsors';
|
|
6
6
|
|
|
7
|
+
// filter for map data
|
|
7
8
|
const map = {
|
|
8
9
|
async get() {
|
|
9
10
|
const url = _getUrl('map-data');
|
|
@@ -11,6 +12,7 @@ export const createSponsorsApiService = (orgId) => {
|
|
|
11
12
|
},
|
|
12
13
|
};
|
|
13
14
|
|
|
15
|
+
// filter for profile
|
|
14
16
|
const profile = {
|
|
15
17
|
async get() {
|
|
16
18
|
const url = _getUrl('profile');
|