バグ修正など
This commit is contained in:
@ -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 }
|
||||
|
Reference in New Issue
Block a user