mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-21 19:24:15 +00:00
22 lines
762 B
JavaScript
22 lines
762 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Services that persists and retrieves user from localStorage.
|
|
*/
|
|
|
|
angular.module('groupServices', ['ngResource']).
|
|
factory('Groups', ['API_URL', '$resource', 'User',
|
|
function(API_URL, $resource, User) {
|
|
var Group = $resource(API_URL + '/api/v1/groups/:gid',
|
|
{gid:'@_id'},
|
|
{
|
|
//'query': {method: "GET", isArray:false}
|
|
postChat: {method: "POST", url: API_URL + '/api/v1/groups/:gid/chat'},
|
|
join: {method: "POST", url: API_URL + '/api/v1/groups/:gid/join'},
|
|
leave: {method: "POST", url: API_URL + '/api/v1/groups/:gid/leave'},
|
|
invite: {method: "POST", url: API_URL + '/api/v1/groups/:gid/invite'}
|
|
});
|
|
|
|
return Group;
|
|
}
|
|
]);
|