angular-dpd
angular-dpd copied to clipboard
dpd.users.logout and dpd.users.exec('logout') both fail.
dpd.users.logout and dpd.users.exec('logout') both fail.
The former is undefined and the latter:
dpd.users.exec('logout') gets POST http://localhost:2403/users/logout 400 (Bad Request)
Also tried adding the following function to the library with no success (get a 404 error)
dpd[d].logout = function(s, e) {
return $http.post(serverRoot + '/logout', null, { withCredentials: true }).success(function(data, status, headers, config) {
return;
}).success(checkUndefinedFunc(s)).error(ef).error(checkUndefinedFunc(e));
};
Whoops, also tried btw
dpd[d].logout = function(s, e) {
return $http.post(serverRoot + '/users//logout', null, { withCredentials: true }).success(function(data, status, headers, config) {
return;
}).success(checkUndefinedFunc(s)).error(ef).error(checkUndefinedFunc(e));
};
You may just need to look at how the regular dpd.js does this and submit a PR to mimic the behavior here.