Skip to content
Snippets Groups Projects
Commit f66152d3 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

New: Get only enabled resources (coscine/issues#611)

New: Changed the Behavior of the api-connection (coscine/issues#603)
parent 424c87e8
Branches
Tags
No related merge requests found
Showing with 274 additions and 120 deletions
{
"name": "@coscine/api-connection",
"version": "1.5.0",
"version": "1.6.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -5498,7 +5498,8 @@
"ansi-regex": {
"version": "2.1.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -5519,12 +5520,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -5539,17 +5542,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -5666,7 +5672,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -5678,6 +5685,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -5692,6 +5700,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -5699,12 +5708,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.3.5",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -5723,6 +5734,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
......@@ -5803,7 +5815,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -5815,6 +5828,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -5900,7 +5914,8 @@
"safe-buffer": {
"version": "5.1.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -5936,6 +5951,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -5955,6 +5971,7 @@
"version": "3.0.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -5998,12 +6015,14 @@
"wrappy": {
"version": "1.0.2",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"yallist": {
"version": "3.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
}
}
},
......
......@@ -16,5 +16,13 @@ export default {
},
setHeader() {
axios.defaults.headers.common[headerKey] = 'Bearer ' + (coscine as any).authorization.bearer;
},
defaultOnCatch(error: any) {
// TODO: Do something with the error
// tslint:disable-next-line: no-console
console.log(error);
},
defaultThenHandler(response: any) {
return;
}
};
......@@ -13,11 +13,11 @@ export class DataSourceApi {
public static getDataSourceFolder(
resourceId: any,
path: string,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path))
.then(thenHandler)
.catch(catchHandler);
......@@ -26,10 +26,10 @@ export class DataSourceApi {
resourceId: any,
path: string,
name: string,
catchHandler: any
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path), {
responseType: 'blob'
})
......@@ -40,17 +40,27 @@ export class DataSourceApi {
})
.catch(catchHandler);
}
public static getDataSource(resourceId: any, path: any, thenHandler: any, catchHandler: any) {
public static getDataSource(
resourceId: any,
path: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path))
.then(thenHandler)
.catch(catchHandler);
}
public static delete(resourceId: any, path: any, thenHandler: any, catchHandler: any) {
public static delete(
resourceId: any,
path: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.delete(getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path))
.then(thenHandler)
.catch(catchHandler);
......@@ -61,11 +71,11 @@ export class DataSourceApi {
path: any,
mimetype: any,
data: any,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios({
return axios({
method: 'PUT',
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path),
headers: {
......@@ -82,11 +92,11 @@ export class DataSourceApi {
path: any,
mimetype: any,
data: any,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios({
return axios({
method: 'PUT',
url: getDataSourceApiUrl() + resourceId + '/' + encodeURIComponent(path) + '/update',
headers: {
......@@ -98,9 +108,13 @@ export class DataSourceApi {
.catch(catchHandler);
}
public static isValidDataSource(body: any, thenHandler: any, catchHandler: any) {
public static isValidDataSource(
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.post(getDataSourceApiUrl() + 'validate', body)
.then(thenHandler)
.catch(catchHandler);
......
......@@ -9,9 +9,12 @@ function getDisciplineApiUrl() {
}
export class DisciplineApi {
public static getDisciplines(thenHandler: any, catchHandler: any) {
public static getDisciplines(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getDisciplineApiUrl())
.then(thenHandler)
.catch(catchHandler);
......
......@@ -9,9 +9,12 @@ function getInstituteApiUrl() {
}
export class InstituteApi {
public static getInstitutes(thenHandler: any, catchHandler: any) {
public static getInstitutes(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getInstituteApiUrl())
.then(thenHandler)
.catch(catchHandler);
......
......@@ -9,9 +9,12 @@ function getLicenseApiUrl() {
}
export class LicenseApi {
public static getLicenses(thenHandler: any, catchHandler: any) {
public static getLicenses(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getLicenseApiUrl())
.then(thenHandler)
.catch(catchHandler);
......
......@@ -13,11 +13,11 @@ export class MetadataApi {
resourceId: string,
filename: string,
version: string,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(
getMetadataApiUrl() +
'resource/' +
......@@ -35,8 +35,8 @@ export class MetadataApi {
filename: string,
version: string,
body: { [index: string]: Array<{ value: any }> },
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
......@@ -53,7 +53,7 @@ export class MetadataApi {
}
}
axios
return axios
.put(
getMetadataApiUrl() +
'resource/' +
......@@ -70,11 +70,11 @@ export class MetadataApi {
public static getApplicationProfile(
projectId: string,
applicationProfileId: string,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(
getMetadataApiUrl() +
'resource/' +
......@@ -88,11 +88,11 @@ export class MetadataApi {
public static getApplicationProfileComplete(
resourceId: string,
applicationProfileId: string,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(
getMetadataApiUrl() +
'resource/' +
......@@ -103,9 +103,13 @@ export class MetadataApi {
.then(thenHandler)
.catch(catchHandler);
}
public static listAllApplicationProfiles(projectId: string, thenHandler: any, catchHandler: any) {
public static listAllApplicationProfiles(
projectId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getMetadataApiUrl() + 'project/' + projectId + '/aplist/')
.then(thenHandler)
.catch(catchHandler);
......@@ -113,11 +117,11 @@ export class MetadataApi {
public static getVocabulary(
projectId: string,
path: string,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getMetadataApiUrl() + 'vocabulary/' + projectId + '/' + encodeURIComponent(path))
.then(thenHandler)
.catch(catchHandler);
......
......@@ -9,44 +9,68 @@ function getProjectApiUrl() {
}
export class ProjectApi {
public static getProjectInformation(projectId: string, thenHandler: any, catchHandler: any) {
public static getProjectInformation(
projectId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getProjectApiUrl() + projectId)
.then(thenHandler)
.catch(catchHandler);
}
public static storeProject(body: any, thenHandler: any, catchHandler: any) {
public static storeProject(
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.post(getProjectApiUrl(), body)
.then(thenHandler)
.catch(catchHandler);
}
public static updateProject(projectId: string, body: any, thenHandler: any, catchHandler: any) {
public static updateProject(
projectId: string,
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.post(getProjectApiUrl() + projectId, body)
.then(thenHandler)
.catch(catchHandler);
}
public static getResources(parentId: string, thenHandler: any, catchHandler: any) {
public static getResources(
parentId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getProjectApiUrl() + parentId + '/resources')
.then(thenHandler)
.catch(catchHandler);
}
public static deleteProject(projectId: string, thenHandler: any, catchHandler: any) {
public static deleteProject(
projectId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.delete(getProjectApiUrl() + projectId)
.then(thenHandler)
.catch(catchHandler);
}
public static getProjects(thenHandler: any, catchHandler: any) {
public static getProjects(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getProjectApiUrl())
.then(thenHandler)
.catch(catchHandler);
......
......@@ -9,23 +9,35 @@ function getProjectRoleApiUrl() {
}
export class ProjectRoleApi {
public static getProjectRoles(parentId: string, thenHandler: any, catchHandler: any) {
public static getProjectRoles(
parentId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getProjectRoleApiUrl() + parentId + '/')
.then(thenHandler)
.catch(catchHandler);
}
public static getUserRoles(projectId: string, thenHandler: any, catchHandler: any) {
public static getUserRoles(
projectId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getProjectRoleApiUrl() + 'project/' + projectId + '/')
.then(thenHandler)
.catch(catchHandler);
}
public static setProjectRole(body: any, thenHandler: any, catchHandler: any) {
public static setProjectRole(
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.post(getProjectRoleApiUrl(), body)
.then(thenHandler)
.catch(catchHandler);
......@@ -34,11 +46,11 @@ export class ProjectRoleApi {
parentId: any,
userId: any,
roleId: any,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.delete(
getProjectRoleApiUrl() + 'project/' + parentId + '/user/' + userId + '/role/' + roleId
)
......
......@@ -9,39 +9,61 @@ function getResourceApiUrl() {
}
export class ResourceApi {
public static getResourceInformation(resourceId: string, thenHandler: any, catchHandler: any) {
public static getResourceInformation(
resourceId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getResourceApiUrl() + resourceId)
.then(thenHandler)
.catch(catchHandler);
}
public static storeResource(parentId: string, body: any, thenHandler: any, catchHandler: any) {
public static storeResource(
parentId: string,
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.post(getResourceApiUrl() + 'Project/' + parentId, body)
.then(thenHandler)
.catch(catchHandler);
}
public static deleteResource(resourceId: string, thenHandler: any, catchHandler: any) {
public static deleteResource(
resourceId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.delete(getResourceApiUrl() + resourceId)
.then(thenHandler)
.catch(catchHandler);
}
public static updateResource(resourceId: string, body: any, thenHandler: any, catchHandler: any) {
public static updateResource(
resourceId: string,
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.post(getResourceApiUrl() + resourceId, body)
.then(thenHandler)
.catch(catchHandler);
}
public static isUserResourceCreator(resourceId: string, thenHandler: any, catchHandler: any) {
apiConnectionBasic.setHeader()
axios
public static isUserResourceCreator(
resourceId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getResourceApiUrl() + 'resource/' + resourceId + '/isCreator')
.then(thenHandler)
.catch(catchHandler)
.catch(catchHandler);
}
}
......@@ -9,16 +9,33 @@ function getResourceTypeApiUrl() {
}
export class ResourceTypeApi {
public static getResourceTypes(thenHandler: any, catchHandler: any) {
public static getResourceTypes(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getResourceTypeApiUrl())
.then(thenHandler)
.catch(catchHandler);
}
public static getFields(resourceTypeId: any, thenHandler: any, catchHandler: any) {
public static getEnabledResourceTypes(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getResourceTypeApiUrl() + 'enabled')
.then(thenHandler)
.catch(catchHandler);
}
public static getFields(
resourceTypeId: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getResourceTypeApiUrl() + resourceTypeId + '/fields')
.then(thenHandler)
.catch(catchHandler);
......
......@@ -7,9 +7,12 @@ function getRoleApiUrl() {
}
export class RoleApi {
public static getRoles(thenHandler: any, catchHandler: any) {
public static getRoles(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getRoleApiUrl())
.then(thenHandler)
.catch(catchHandler);
......
const axios = require('axios')
const axios = require('axios');
import apiConnectionBasic from '../basic/api-connection-basic'
import apiConnectionBasic from '../basic/api-connection-basic';
function getSearchApiUrl() {
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/'
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Project/Search/';
}
export class SearchApi {
public static getSearchResults(query: string, thenHandler: any, catchHandler: any) {
apiConnectionBasic.setHeader()
axios
public static getSearchResults(
query: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getSearchApiUrl() + 'all/' + encodeURIComponent(query))
.then(thenHandler)
.catch(catchHandler)
.catch(catchHandler);
}
public static getSearchResultsNoFilter(thenHandler: any, catchHandler: any) {
apiConnectionBasic.setHeader()
axios
public static getSearchResultsNoFilter(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getSearchApiUrl() + 'allNoFilter/')
.then(thenHandler)
.catch(catchHandler)
.catch(catchHandler);
}
public static getSearchResultsForProject(
projectId: string,
query: string,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader()
axios
apiConnectionBasic.setHeader();
return axios
.get(getSearchApiUrl() + 'project/' + projectId + '/' + encodeURIComponent(query))
.then(thenHandler)
.catch(catchHandler)
.catch(catchHandler);
}
public static getSearchResultsForProjectNoFilter(
projectId: string,
thenHandler: any,
catchHandler: any
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader()
axios
apiConnectionBasic.setHeader();
return axios
.get(getSearchApiUrl() + 'projectNoFilter/' + projectId)
.then(thenHandler)
.catch(catchHandler)
.catch(catchHandler);
}
}
......@@ -9,9 +9,13 @@ function getSubProjectApiUrl() {
}
export class SubProjectApi {
public static getSubProjects(parentId: string, thenHandler: any, catchHandler: any) {
public static getSubProjects(
parentId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getSubProjectApiUrl() + parentId + '/')
.then(thenHandler)
.catch(catchHandler);
......
......@@ -7,17 +7,25 @@ function getUserApiUrl() {
}
export class UserApi {
public static queryUsers(query: string, parentId: string, thenHandler: any, catchHandler: any) {
public static queryUsers(
query: string,
parentId: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getUserApiUrl() + 'query/' + query + '/project/' + parentId + '/')
.then(thenHandler)
.catch(catchHandler);
}
public static getUser(thenHandler: any, catchHandler: any) {
public static getUser(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getUserApiUrl() + 'user')
.then(thenHandler)
.catch(catchHandler);
......
......@@ -9,9 +9,12 @@ function getVisibilityApiUrl() {
}
export class VisibilityApi {
public static getVisibilities(thenHandler: any, catchHandler: any) {
public static getVisibilities(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
axios
return axios
.get(getVisibilityApiUrl())
.then(thenHandler)
.catch(catchHandler);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment