소스 검색

Fixed issue with changing roles on admin users tab

theflametrooper 8 년 전
부모
커밋
8f66bf2391
1개의 변경된 파일6개의 추가작업 그리고 7개의 파일을 삭제
  1. 6 7
      frontend/components/Modals/EditUser.vue

+ 6 - 7
frontend/components/Modals/EditUser.vue

@@ -44,12 +44,7 @@
 		components: { Modal },
 		data() {
 			return {
-				editing: {},
-				video: {
-					player: null,
-					paused: false,
-					playerReady: false
-				}
+				editing: {}
 			}
 		},
 		methods: {
@@ -67,7 +62,11 @@
 				let _this = this;
 				this.socket.emit(`users.updateRole`, this.editing._id, this.editing.role, res => {
 					Toast.methods.addToast(res.message, 4000);
-					if (res.status === 'success' && _this.editing.role === 'default') location.reload();
+					if (
+							res.status === 'success' &&
+							_this.editing.role === 'default' &&
+							_this.editing._id === _this.$parent.$parent.$parent.userId
+					) location.reload();
 				});
 			}
 		},