import _ from 'lodash';

export const resolveCallback = (action, param) => {
	if (action.payload) {
		const { resolve } = action.payload;
		if (_.isFunction(resolve)) {
			resolve(param);
		}
	}
};


export const rejectCallback = (action, param) => {
	if (action.payload) {
		const { reject } = action.payload;
		if (_.isFunction(reject)) {
			reject(param);
		}
	}
};
