diff options
Diffstat (limited to 'server/sonar-web/src/main/js/api/navigation.jsx')
-rw-r--r-- | server/sonar-web/src/main/js/api/navigation.jsx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/server/sonar-web/src/main/js/api/navigation.jsx b/server/sonar-web/src/main/js/api/navigation.jsx deleted file mode 100644 index 8204fc34c11..00000000000 --- a/server/sonar-web/src/main/js/api/navigation.jsx +++ /dev/null @@ -1,26 +0,0 @@ -function _request(options) { - let $ = jQuery; - return $.ajax(options); -} - -function _url(path) { - return window.baseUrl + path; -} - -function _typeError(method, message) { - throw new TypeError(`navigation#${method}: ${message}`); -} - -export function global() { - let url = _url('/api/navigation/global'); - return _request({ type: 'GET', url }); -} - -export function component(componentKey) { - if (typeof componentKey !== 'string' || !componentKey.length) { - return _typeError('component', 'please provide componentKey'); - } - let url = _url('/api/navigation/component'); - let data = { componentKey }; - return _request({ type: 'GET', url, data }); -} |