Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • BrukerDataLoader
  • YXLONDataLoader
  • anatomical_prior
  • python_demos
  • his_reader
  • spectral_temporal_algos
  • flatten_detector
  • yushan-TIGRE-multi-GPU
  • deprecated-pydev
  • v2.2
  • v2.1
  • v2.0
  • py-v0.1.8
  • py-V0.1.7
  • pyv0.1.6
  • pyv0.1.5
  • v1.5
  • v1.4
  • v1.3.1
  • v1.2.1
  • v1.3
  • v1.2
  • v1.1.7-fix2
  • v1.1.7-fix
  • v1.1.7
  • v1.1.6-fix
  • v1.1.6
  • v1.1.5
  • 1.1.4
30 results

changelog.md

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    To find the state of this project's repository at the time of any of these versions, check out the tags.
    contactchange-api.ts 1.29 KiB
    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);
      }
    }