添加修改密码失败的提示

This commit is contained in:
648540858
2021-10-11 18:19:03 +08:00
parent b922898129
commit 0a951e876a
3 changed files with 12 additions and 2 deletions

View File

@@ -95,7 +95,7 @@ public class MediaServiceImpl implements IMediaService {
streamInfoResult.setHttps_ts(String.format("https://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream));
streamInfoResult.setWss_ts(String.format("wss://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream));
streamInfoResult.setWss_ts(String.format("wss://%s:%s/%s/%s.live.ts", addr, mediaInfo.getHttpSSlPort(), app, stream));
streamInfoResult.setRtc(String.format("http://%s:%s/index/api/webrtc?app=%s&stream=%s&type=play", mediaInfo.getStreamIp(), mediaInfo.getHttpSSlPort(), app, stream));
streamInfoResult.setRtc(String.format("https://%s:%s/index/api/webrtc?app=%s&stream=%s&type=play", mediaInfo.getStreamIp(), mediaInfo.getHttpSSlPort(), app, stream));
}
streamInfoResult.setTracks(tracks);

View File

@@ -76,7 +76,11 @@ public class UserController {
@PostMapping("/changePassword")
public String changePassword(@RequestParam String oldPassword, @RequestParam String password){
// 获取当前登录用户id
String username = SecurityUtils.getUserInfo().getUsername();
LoginUser userInfo = SecurityUtils.getUserInfo();
if (userInfo== null) {
return "fail";
}
String username = userInfo.getUsername();
LoginUser user = null;
try {
user = SecurityUtils.login(username, oldPassword, authenticationManager);