Merge pull request #3970 from Alys/tags-Sep-02

allow new tag to have same UUID on client and server - fixes https://github.com/HabitRPG/habitrpg/issues/2856 , fixes https://github.com/HabitRPG/habitrpg/issues/2370
This commit is contained in:
Tyler Renelle 2014-09-02 15:50:09 -06:00
commit 46aec7ef95

View file

@ -1,7 +1,7 @@
"use strict";
habitrpg.controller("FiltersCtrl", ['$scope', '$rootScope', 'User',
function($scope, $rootScope, User) {
habitrpg.controller("FiltersCtrl", ['$scope', '$rootScope', 'User', 'Shared',
function($scope, $rootScope, User, Shared) {
var user = User.user;
$scope._editing = false;
@ -30,7 +30,7 @@ habitrpg.controller("FiltersCtrl", ['$scope', '$rootScope', 'User',
};
$scope.createTag = function(name) {
User.user.ops.addTag({body:{name:name}});
User.user.ops.addTag({body:{name:name, id:Shared.uuid()}});
$scope._newTag = '';
};
}]);