redash/client/app/services/group.js
2016-11-26 11:35:21 +02:00

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);
}