angular-dpd icon indicating copy to clipboard operation
angular-dpd copied to clipboard

dpd.users.logout and dpd.users.exec('logout') both fail.

Open fotoflo opened this issue 11 years ago • 2 comments

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

fotoflo avatar Feb 17 '15 04:02 fotoflo

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

fotoflo avatar Feb 17 '15 05:02 fotoflo

You may just need to look at how the regular dpd.js does this and submit a PR to mimic the behavior here.

slively avatar Feb 18 '15 02:02 slively