@lipagas/ember-core
Version:
Provides all the core services, decorators and utilities for building a Fleetbase extension for the Console.
12 lines (9 loc) • 396 B
JavaScript
import consoleUrl from './console-url';
import config from '@fleetbase/console/config/environment';
import { get } from '@ember/object';
export default function apiUrl(path, queryParams = {}, subdomain = null, host = null) {
if (host === null) {
host = `${get(config, 'API.host')}/${get(config, 'API.namespace')}`;
}
return consoleUrl(path, queryParams, subdomain, host);
}