import { NetworkService } from './network-service';

const API_BASE_URL = process.env.REACT_APP_API_EXECUTION_ADDRESS;

export default class ApplicationContractService {

    static getContractByUserId = (callback, errCallback, queryParams) => {
        NetworkService.get(`${API_BASE_URL}/applicationContract/user`, callback, errCallback, queryParams);
    };

    static uploadApplicationContract = (applicationId, body, callback, errCallback, queryParams) => {
        NetworkService.postMultiPart(`${API_BASE_URL}/applicationContract/application/${applicationId}`, body, callback, errCallback, queryParams);
    };

    static updateApplicationContract = (contractId, body, callback, errCallback, queryParams) => {
        NetworkService.putMultiPart(`${API_BASE_URL}/applicationContract/${contractId}`, body, callback, errCallback, queryParams);
    };
}
