mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
contrib: add Admin page to update contributor status. Start migrating from User.backer => User.contributor
This commit is contained in:
16
public/js/controllers/adminCtrl.js
Normal file
16
public/js/controllers/adminCtrl.js
Normal file
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
|
||||
habitrpg.controller("AdminCtrl", ['$scope', '$rootScope', 'User', 'Members', 'Notification',
|
||||
function($scope, $rootScope, User, Members, Notification) {
|
||||
$scope.profile = undefined;
|
||||
$scope.loadUser = function(uuid){
|
||||
$scope.profile = Members.Member.get({uid:uuid});
|
||||
}
|
||||
$scope.save = function(profile) {
|
||||
profile.$save(function(){
|
||||
Notification.text("User updated");
|
||||
$scope.profile = undefined;
|
||||
$scope._uuid = undefined;
|
||||
})
|
||||
}
|
||||
}])
|
||||
Reference in New Issue
Block a user