Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 25, 2025. It is now read-only.
/chat_servicePublic archive

Commit0c75d52

Browse files
committed
__FIX__ expireTransaction
1 parentdf5924e commit0c75d52

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎lib/controllers/room_controller.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,14 +366,14 @@ exports.choosePsychologist = async (io, socket, data, callback) => {
366366

367367
exports.expireTransaction=async(io,socket,data,callback)=>{
368368
const{
369-
room_id
369+
room_id,
370+
user_id
370371
}=data;
371372
try{
372-
constuser_id=socket.handshake.query.user_id;
373373
log({
374374
'expireTransaction data':data
375375
});
376-
constvalid=validator.joi.validate(data,validator.isNew);
376+
constvalid=validator.joi.validate(data,validator.expireTransaction);
377377
if(valid.error){
378378
elog({
379379
'isNew validation error':valid.error

‎lib/utils/validator.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ exports.notNew = joi.object().keys({
6666

6767
exports.expireTransaction=joi.object().keys({
6868
room_id:joi.string().required().regex(/^[a-f\d]{24}$/i),
69+
user_id:joi.string().required().regex(/^[a-f\d]{24}$/i),
6970
access_token:joi.optional()
7071
})
7172

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp