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

Merge branch 'Sprint/2021-04' into 'master'

Sprint/2021 04

See merge request !119
parents 06a6e9f0 da86e723
No related branches found
No related tags found
1 merge request!119Sprint/2021 04
export { ActivatedFeaturesApi } from './requests/activatedFeatures-api';
export { AdminApi } from './requests/admin-api';
export { BlobApi } from './requests/blob-api';
export { ContactChangeApi } from './requests/contactchange-api';
export { DisciplineApi } from './requests/discipline-api';
export { LanguageApi } from './requests/language-api';
export { LicenseApi } from './requests/license-api';
......
const axios = require('axios');
import apiConnectionBasic from '../basic/api-connection-basic';
function getContactChangeApiUrl() {
return (
'https://' + apiConnectionBasic.getHostName() + '/coscine/api/Coscine.Api.User/ContactChange/'
);
}
export class ContactChangeApi {
public static getStatus(
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
return axios
.get(getContactChangeApiUrl() + 'status')
.then(thenHandler)
.catch(catchHandler);
}
public static confirm(
token: string,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
return axios
.get(getContactChangeApiUrl() + 'confirm/' + token)
.then(thenHandler)
.catch(catchHandler);
}
public static emailChange(
body: any,
thenHandler: any = apiConnectionBasic.defaultThenHandler,
catchHandler: any = apiConnectionBasic.defaultOnCatch
) {
apiConnectionBasic.setHeader();
const config = { headers: {'Content-Type': 'application/json'} };
return axios
.post(getContactChangeApiUrl() + 'emailchange', body, config)
.then(thenHandler)
.catch(catchHandler);
}
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment