校验:添加接口校验
This commit is contained in:
@@ -119,7 +119,6 @@ export class ChatHandler {
|
||||
async getPrivateMessage(msg: { targetRoleId: string, fromSeqId: number, count: number }, session: BackendSession) {
|
||||
const roleId = session.get('roleId');
|
||||
const { targetRoleId, fromSeqId = Infinity, count = DEFAULT_MSG_PER_PAGE } = msg;
|
||||
if( count < 0) return resResult(STATUS.WRONG_PARMS);
|
||||
const msgs = await getPrivateMessages(roleId, targetRoleId, fromSeqId, count);
|
||||
const targetRoleInfo = await getSimpleRoleInfo(targetRoleId);
|
||||
return resResult(STATUS.SUCCESS, { targetRoleId, msgs, targetRoleInfo });
|
||||
|
||||
Reference in New Issue
Block a user