From 1c410872600655b17b0ef003d0e264ad91bcf82d Mon Sep 17 00:00:00 2001 From: kunw Date: Fri, 30 Sep 2016 14:33:05 +0800 Subject: [PATCH] Revert some changes --- .../components/repository/list-repository.directive.js | 2 +- static/resources/js/session/session.current-user.js | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/static/resources/js/components/repository/list-repository.directive.js b/static/resources/js/components/repository/list-repository.directive.js index 7154c0ae3..655ac6764 100644 --- a/static/resources/js/components/repository/list-repository.directive.js +++ b/static/resources/js/components/repository/list-repository.directive.js @@ -154,7 +154,7 @@ function deleteRepositorySuccess(data, status) { vm.toggleInProgress[vm.repoName + '|' + vm.tag] = false; - $scope.$broadcast('refreshTags', true); + vm.retrieve(); } function deleteRepositoryFailed(data, status) { diff --git a/static/resources/js/session/session.current-user.js b/static/resources/js/session/session.current-user.js index b5e0018f0..9e51af4cd 100644 --- a/static/resources/js/session/session.current-user.js +++ b/static/resources/js/session/session.current-user.js @@ -32,14 +32,7 @@ function getCurrentUserComplete(response) { if(angular.isDefined(response)) { - var user = response.data; - currentUser.set({ - 'user_id': user.user_id, - 'username': user.username, - 'role_name': user.role_name, - 'email': user.email, - 'realname': user.realname, - 'comment': user.comment}); + currentUser.set(response.data); if(location.pathname === '/') { $window.location.href = '/dashboard'; }