mirror of
https://github.com/getredash/redash.git
synced 2026-05-10 15:00:16 -04:00
* Refine Auth service: remove dead code and fix race condition * Export services in CommonJS style * Refine Users, Events and OfflineListener services * Refactor Notifications service - rewrite to CommonJS * Replace Angular service injection with imports in React components * Fix Footer tests * Events service -> recordEvent function * CR1
20 lines
539 B
JavaScript
20 lines
539 B
JavaScript
export let Destination = null; // eslint-disable-line import/no-mutable-exports
|
|
|
|
function DestinationService($resource) {
|
|
const actions = {
|
|
get: { method: 'GET', cache: false, isArray: false },
|
|
query: { method: 'GET', cache: false, isArray: true },
|
|
};
|
|
return $resource('api/destinations/:id', { id: '@id' }, actions);
|
|
}
|
|
|
|
export default function init(ngModule) {
|
|
ngModule.factory('Destination', DestinationService);
|
|
|
|
ngModule.run(($injector) => {
|
|
Destination = $injector.get('Destination');
|
|
});
|
|
}
|
|
|
|
init.init = true;
|