mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
APIv2: add paths /api/v2/* and /api/v1/*. v1 has limited deprecated routes (only the things I know currently work), and we'll notify 3rd-partyists to migrate to apiv2 once it's documented and tested
This commit is contained in:
@@ -54,7 +54,7 @@ habitrpg.controller('SettingsCtrl',
|
||||
if (!changePass.oldPassword || !changePass.newPassword || !changePass.confirmNewPassword) {
|
||||
return alert("Please fill out all fields");
|
||||
}
|
||||
$http.post(API_URL + '/api/v1/user/change-password', changePass)
|
||||
$http.post(API_URL + '/api/v2/user/change-password', changePass)
|
||||
.success(function(){
|
||||
alert("Password successfully changed");
|
||||
$scope.changePass = {};
|
||||
@@ -92,7 +92,7 @@ habitrpg.controller('SettingsCtrl',
|
||||
}
|
||||
|
||||
$scope['delete'] = function(){
|
||||
$http['delete'](API_URL + '/api/v1/user')
|
||||
$http['delete'](API_URL + '/api/v2/user')
|
||||
.success(function(){
|
||||
localStorage.clear();
|
||||
window.location.href = '/logout';
|
||||
|
||||
Reference in New Issue
Block a user