mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 01:48:54 +00:00
15 lines
532 B
JavaScript
15 lines
532 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 (ngModule) {
|
|
ngModule.factory('Group', Group);
|
|
}
|