互換性を追加

This commit is contained in:
syuilo 2018-10-08 08:58:12 +09:00
parent c4d4293c46
commit e00b5f11cb
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -30,6 +30,9 @@ module.exports = (server: http.Server) => {
type = payload.type; type = payload.type;
payload = payload.body; payload = payload.body;
} }
if (type.startsWith('api:')) {
type = payload.type.replace('api:', 'api-res:');
}
connection.send(JSON.stringify({ connection.send(JSON.stringify({
type: type, type: type,
body: payload body: payload