export default class BaseApiService {
	constructor($http, $log, appConfig, websocket, path) {
		'ngInject';

		this.$http = $http;
		this.$log = $log;

		this._ = _;
		this.websocket = websocket;

		this.host = `${appConfig.host}:3000`;
		this.url = `http://${this.host}/api/${path}`;

		this.$log.info('constructor()', this);
	}

	get(query) {
		return this.$http.get(`${this.url}/${query}`);
	}

	update(data, id = '') {
		return this.$http.post(`${this.url}/${id}`, data);
	}
}

export default class BaseApiService {
	constructor($http, $log, appConfig, websocket, path) {
		'ngInject';

		this.$http = $http;
		this.$log = $log;

		this._ = _;
		this.websocket = websocket;

		this.host = `${appConfig.host}:3000`;
		this.url = `http://${this.host}/api/${path}`;

		this.$log.info('constructor()', this);
	}

	get(query = '') {
		return this.$http.get(`${this.url}/${query}`);
	}

	update(data, id = '') {
		return this.$http.post(`${this.url}/${id}`, data);
	}
}

Set query to empty string so 'undefined' isn't being sent through API
Set query to empty string so 'undefined' isn't being sent through API
