バグ修正など
This commit is contained in:
parent
665afccb45
commit
a8083eb52b
6 changed files with 21 additions and 28 deletions
|
@ -70,12 +70,13 @@ export default async function(
|
|||
}
|
||||
});
|
||||
|
||||
connection.on('message', data => {
|
||||
connection.on('message', async data => {
|
||||
const msg = JSON.parse(data.utf8Data);
|
||||
|
||||
switch (msg.type) {
|
||||
case 'api':
|
||||
call(msg.endpoint, user, app, msg.data).then(res => {
|
||||
// 新鮮なデータを利用するためにユーザーをフェッチ
|
||||
call(msg.endpoint, await User.findOne({ _id: user._id }), app, msg.data).then(res => {
|
||||
connection.send(JSON.stringify({
|
||||
type: `api-res:${msg.id}`,
|
||||
body: { res }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue