|
|
@@ -312,14 +312,14 @@ public class MirrorController {
|
|
|
* @param relationId 车票id
|
|
|
*/
|
|
|
@GetMapping("/midjourneyMirror/{relationId}")
|
|
|
- public void midjourneyMirror(@PathVariable Long relationId,HttpServletResponse response) throws IOException {
|
|
|
+ public String midjourneyMirror(@PathVariable Long relationId) {
|
|
|
Long userId = StpUserUtil.getLoginIdAsLong();
|
|
|
MidjourneyUser midjourneyUser = midjourneyAccountService.getMidjourneyUserToken(userId, relationId);
|
|
|
- response.sendRedirect( midjourneyHost + (envCommonService.isPreEnv() ? "/8082":"/8081") +"/api/applets/mirror/midjourneyMirrorWithToken/" + midjourneyUser.getUserToken());
|
|
|
+ return midjourneyHost + (envCommonService.isPreEnv() ? "/8082":"/8081") +"/api/applets/mirror/midjourneyMirrorWithToken/" + midjourneyUser.getUserToken();
|
|
|
}
|
|
|
|
|
|
@GetMapping("/midjourneyMirrorWithToken/{userToken}")
|
|
|
- public void midjourneyMirrorWithToken(@PathVariable String userToken,HttpServletResponse response) throws IOException {
|
|
|
+ public void midjourneyMirrorWithToken(@PathVariable String userToken) throws IOException {
|
|
|
Cookie cookie = new Cookie("userToken", userToken);
|
|
|
cookie.setMaxAge(31536000);
|
|
|
cookie.setPath("/");
|