Skip to content
Snippets Groups Projects

Product/1119 quota admin page

Merged Marcel Nellesen requested to merge Product/1119-quotaAdminPage into Sprint/2020-22
3 files
+ 34
1
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 32
0
const axios = require('axios');
import apiConnectionBasic from '../basic/api-connection-basic';
function getAdminApiUrl() {
return 'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.Admin/Admin/';
}
export class AdminApi {
public static GetProject(
projectString: String,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getAdminApiUrl() + projectString)
.then(thenHandler)
.catch(catchHandler);
}
public static UpdateQuota(
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.post(getAdminApiUrl(), body)
.then(thenHandler)
.catch(catchHandler);
}
}
Loading