Skip to content

Commit

Permalink
fix: 修复查询当前用户传入userid的缺陷
Browse files Browse the repository at this point in the history
  • Loading branch information
liuruibin committed Apr 18, 2023
1 parent e571533 commit 23e3231
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ public UserDTO refreshSessionUser(@PathVariable String sign, @PathVariable Strin
return SessionUtils.getUser();
}

@GetMapping("/info/{userId}")
public UserDTO getUserInfo(@PathVariable(value = "userId") String userId) {
return userService.getUserInfo(userId);
@GetMapping("/info")
public UserDTO getUserInfo() {
return userService.getUserInfo(SessionUtils.getUserId());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
});
},
initTableData() {
this.result = this.$get("/user/info/" + encodeURIComponent(this.currentUser().id), response => {
this.result = this.$get("/user/info", response => {
let data = response.data;
this.isLocalUser = response.data.source === 'LOCAL';
let dataList = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export default {
});
},
initTableData() {
this.result = this.$get("/user/info/" + encodeURIComponent(this.currentUser().id), response => {
this.result = this.$get("/user/info", response => {
let data = response.data;
this.isLocalUser = response.data.source === 'LOCAL';
let dataList = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ export default {
this.$emit("confirm");
},
async getUserSeleniumServer() {
let userId = getCurrentUserId();
let res = await this.$get(`/user/info/${userId}`);
let res = await this.$get(`/user/info`);
if (res.data) {
this.seleniumServer = res.data.data.seleniumServer || "";
}
Expand Down

0 comments on commit 23e3231

Please sign in to comment.