|
@@ -146,11 +146,10 @@ public class CrowdTaskController{
|
|
|
@LoginRequired
|
|
|
@RequestMapping(value = "/project/{projectCode}/task/{taskCode}/token", method = RequestMethod.GET)
|
|
|
public ResponseVO<String> getToken(@PathVariable("projectCode") String projectCode, @PathVariable("taskCode") String taskCode, HttpSession session){
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- Long userId = 99222L;
|
|
|
+ Object user = session.getAttribute("userId");
|
|
|
+ if (user == null)
|
|
|
+ return new ResponseVO<>(ServerCode.ERROR, "未登录,请先登录");
|
|
|
+ Long userId = Long.parseLong((String)session.getAttribute("userId"));
|
|
|
return new ResponseVO<>(ServerCode.SUCCESS, taskService.getToken(projectCode, taskCode, userId));
|
|
|
}
|
|
|
}
|