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

const API_BASE_URL = process.env.REACT_APP_API_EXECUTION_ADDRESS;

export default class PecEmailService {

    static getPecEmails = (callback, errCallback, queryParams) => {
        NetworkService.get(`${API_BASE_URL}/pecMail`, callback, errCallback, queryParams);
    };

    static doUserAction = (callback, errCallback, queryParams) => {
        NetworkService.post(`${API_BASE_URL}/pecMail/userAction`, {}, callback, errCallback, queryParams);
    };

    static rejectUserAction = (userAction, callback, errCallback, queryParams) => {
        NetworkService.post(`${API_BASE_URL}/pecMail/userAction/${userAction}/reject`, {}, callback, errCallback, queryParams);
    };
}
