mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 19:00:09 -04:00
19 lines
558 B
JavaScript
19 lines
558 B
JavaScript
function Group($resource) {
|
|
const actions = {
|
|
get: { method: 'GET', cache: false, isArray: false },
|
|
query: { method: 'GET', cache: false, isArray: true },
|
|
members: {
|
|
method: 'GET', cache: false, isArray: true, url: 'api/groups/:id/members',
|
|
},
|
|
dataSources: {
|
|
method: 'GET', cache: false, isArray: true, url: 'api/groups/:id/data_sources',
|
|
},
|
|
};
|
|
const resource = $resource('api/groups/:id', { id: '@id' }, actions);
|
|
return resource;
|
|
}
|
|
|
|
export default function init(ngModule) {
|
|
ngModule.factory('Group', Group);
|
|
}
|