mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-09 05:00:30 +08:00
fix: add koa-route
This commit is contained in:
parent
f71b210839
commit
c129e68abb
@ -49,6 +49,8 @@ class InterfaceEdit extends Component{
|
|||||||
s.onopen = (e)=>{
|
s.onopen = (e)=>{
|
||||||
console.log('open',e)
|
console.log('open',e)
|
||||||
s.send('abc')
|
s.send('abc')
|
||||||
|
//s.close()
|
||||||
|
s.send('aaaaa')
|
||||||
}
|
}
|
||||||
|
|
||||||
s.onclose = (e)=>{
|
s.onclose = (e)=>{
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
"koa-bodyparser": "^3.2.0",
|
"koa-bodyparser": "^3.2.0",
|
||||||
"koa-logger": "^3.0.0",
|
"koa-logger": "^3.0.0",
|
||||||
"koa-mysql-session": "0.0.2",
|
"koa-mysql-session": "0.0.2",
|
||||||
|
"koa-route": "^3.2.0",
|
||||||
"koa-router": "^7.0.1",
|
"koa-router": "^7.0.1",
|
||||||
"koa-send": "^3.2.0",
|
"koa-send": "^3.2.0",
|
||||||
"koa-session-minimal": "^3.0.3",
|
"koa-session-minimal": "^3.0.3",
|
||||||
|
@ -314,6 +314,10 @@ class interfaceController extends baseController {
|
|||||||
// do something with the message from client
|
// do something with the message from client
|
||||||
console.log(message);
|
console.log(message);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ctx.websocket.on('close', function(){
|
||||||
|
console.log('websocket: close')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class interfaceModel extends baseModel {
|
|||||||
path: { type: String, required: true },
|
path: { type: String, required: true },
|
||||||
method: { type: String, required: true },
|
method: { type: String, required: true },
|
||||||
project_id: { type: Number, required: true },
|
project_id: { type: Number, required: true },
|
||||||
edit_uid: {type: Number},
|
edit_uid: {type: Number, default: 0},
|
||||||
status: {type: String, enum: ['undone', 'done'], default: 'undone'},
|
status: {type: String, enum: ['undone', 'done'], default: 'undone'},
|
||||||
desc: String,
|
desc: String,
|
||||||
add_time: Number,
|
add_time: Number,
|
||||||
|
@ -615,7 +615,11 @@ var interfaceController = function (_baseController) {
|
|||||||
console.log(message);
|
console.log(message);
|
||||||
});
|
});
|
||||||
|
|
||||||
case 5:
|
ctx.websocket.on('close', function () {
|
||||||
|
console.log('websocket: close');
|
||||||
|
});
|
||||||
|
|
||||||
|
case 6:
|
||||||
case 'end':
|
case 'end':
|
||||||
return _context6.stop();
|
return _context6.stop();
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ var interfaceModel = function (_baseModel) {
|
|||||||
path: { type: String, required: true },
|
path: { type: String, required: true },
|
||||||
method: { type: String, required: true },
|
method: { type: String, required: true },
|
||||||
project_id: { type: Number, required: true },
|
project_id: { type: Number, required: true },
|
||||||
edit_uid: { type: Number },
|
edit_uid: { type: Number, default: 0 },
|
||||||
status: { type: String, enum: ['undone', 'done'], default: 'undone' },
|
status: { type: String, enum: ['undone', 'done'], default: 'undone' },
|
||||||
desc: String,
|
desc: String,
|
||||||
add_time: Number,
|
add_time: Number,
|
||||||
|
Loading…
Reference in New Issue
Block a user