Files
bamboo/app/message/api/joinRoom.js
T
2022-07-07 22:16:39 +08:00

23 lines
410 B
JavaScript

'use strict';
module.exports = {
name:"加入房间",
doc:``,
params: {
"type": ["accountPassword"],//登录类型
"data": "object",//数据
},
fun : async (ctx, app) => {
const {type, data} = ctx.params
if (await $components.login[type](data)) {
return $res.success({
token: await $components.jwt.sign({})
}, "登录成功")
}
return $res.error({}, "登录失败")
}
}