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
16 lines
483 B
JavaScript
16 lines
483 B
JavaScript
export let AlertSubscription = null; // eslint-disable-line import/no-mutable-exports
|
|
|
|
function AlertSubscriptionService($resource) {
|
|
return $resource('api/alerts/:alertId/subscriptions/:subscriberId', { alertId: '@alert_id', subscriberId: '@id' });
|
|
}
|
|
|
|
export default function init(ngModule) {
|
|
ngModule.factory('AlertSubscription', AlertSubscriptionService);
|
|
|
|
ngModule.run(($injector) => {
|
|
AlertSubscription = $injector.get('AlertSubscription');
|
|
});
|
|
}
|
|
|
|
init.init = true;
|