Merge pull request #7186 from TheHollidayInn/api-v3-registration-fix
Changed id param for registration response
This commit is contained in:
@@ -49,7 +49,7 @@ angular.module('habitrpg')
|
||||
var url = ApiUrl.get() + "/api/v3/user/auth/local/register";
|
||||
if($rootScope.selectedLanguage) url = url + '?lang=' + $rootScope.selectedLanguage.code;
|
||||
$http.post(url, scope.registerVals).success(function(res, status, headers, config) {
|
||||
runAuth(res.data.id, res.data.apiToken);
|
||||
runAuth(res.data._id, res.data.apiToken);
|
||||
}).error(errorAlert);
|
||||
};
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@ angular.module('habitrpg')
|
||||
},
|
||||
|
||||
authenticate: function (uuid, token, cb) {
|
||||
if (!!uuid && !!token) {
|
||||
if (uuid && token) {
|
||||
var offset = moment().zone(); // eg, 240 - this will be converted on server as -(offset/60)
|
||||
$http.defaults.headers.common['x-api-user'] = uuid;
|
||||
$http.defaults.headers.common['x-api-key'] = token;
|
||||
|
||||
Reference in New Issue
Block a user