fix get chatroom error

This commit is contained in:
heavyrain.lee
2019-04-25 15:16:20 +08:00
parent 21aa248d49
commit 1d309816ba
@@ -40,10 +40,10 @@ public class GetChatroomInfoAction extends AdminAction {
WFCMessage.ChatroomInfo info = messagesStore.getChatroomInfo(chatroomid); WFCMessage.ChatroomInfo info = messagesStore.getChatroomInfo(chatroomid);
RestResult result; RestResult result;
if (info == null) { if (info != null) {
result = RestResult.ok(new OutputGetChatroomInfo(chatroomid, messagesStore.getChatroomMemberCount(chatroomid), info)); result = RestResult.ok(new OutputGetChatroomInfo(chatroomid, messagesStore.getChatroomMemberCount(chatroomid), info));
} else { } else {
result = RestResult.resultOf(ErrorCode.ERROR_CODE_SUCCESS); result = RestResult.resultOf(ErrorCode.ERROR_CODE_NOT_EXIST);
} }
response.setStatus(HttpResponseStatus.OK); response.setStatus(HttpResponseStatus.OK);