Skip to content

Commit d00b193

Browse files
authoredFeb 7, 2021
Merge pull request bestony#32 from johnpoint/master
typo: fix
2 parents 7fd1a8f + 2d368be commit d00b193

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎js/app.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,16 @@ function index() {
121121
if (manual) {
122122
// 保留有权限的用户数据
123123
if (this.isAdmin) {
124+
let roomQuery = new AV.Query("Room");
125+
roomQuery.equalTo("roomId", this.routerParam.roomId);
126+
let room = await roomQuery.find();
127+
// 移除当前用户
128+
await AV.Object.destroyAll(room);
124129
let roomUserQuery = new AV.Query("RoomUser");
125130
roomUserQuery.equalTo("roomId", this.routerParam.roomId);
126131
let roomUser = await roomUserQuery.find();
127132
// 移除当前用户
128133
await AV.Object.destroyAll(roomUser);
129-
let roomQuery = new AV.Query("Room");
130-
roomUserQuery.equalTo("roomId", this.routerParam.roomId);
131-
let room = await roomQuery.find();
132-
// 移除当前用户
133-
await AV.Object.destroyAll(room);
134134
}
135135
} else {
136136
if(this.isAdmin||this.isHost){

0 commit comments

Comments
 (0)