allow newly created tag to have the same UUID on client and server - fixes https://github.com/HabitRPG/habitrpg/issues/2856

This commit is contained in:
Alice Harris 2014-09-03 06:16:46 +10:00
parent 72c6fd720a
commit 28505c139f

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 = '';
};
}]);