【fix sonar】 TestSocketController.java 文件
This commit is contained in:
+2
-2
@@ -19,7 +19,7 @@ public class TestSocketController {
|
|||||||
|
|
||||||
@PostMapping("/sendAll")
|
@PostMapping("/sendAll")
|
||||||
public Result<String> sendAll(@RequestBody JSONObject jsonObject) {
|
public Result<String> sendAll(@RequestBody JSONObject jsonObject) {
|
||||||
Result<String> result = new Result<String>();
|
Result<String> result = new Result<>();
|
||||||
String message = jsonObject.getString("message");
|
String message = jsonObject.getString("message");
|
||||||
JSONObject obj = new JSONObject();
|
JSONObject obj = new JSONObject();
|
||||||
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
obj.put(WebsocketConst.MSG_CMD, WebsocketConst.CMD_TOPIC);
|
||||||
@@ -32,7 +32,7 @@ public class TestSocketController {
|
|||||||
|
|
||||||
@PostMapping("/sendUser")
|
@PostMapping("/sendUser")
|
||||||
public Result<String> sendUser(@RequestBody JSONObject jsonObject) {
|
public Result<String> sendUser(@RequestBody JSONObject jsonObject) {
|
||||||
Result<String> result = new Result<String>();
|
Result<String> result = new Result<>();
|
||||||
String userId = jsonObject.getString("userId");
|
String userId = jsonObject.getString("userId");
|
||||||
String message = jsonObject.getString("message");
|
String message = jsonObject.getString("message");
|
||||||
JSONObject obj = new JSONObject();
|
JSONObject obj = new JSONObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user