You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
api-visualizer/web-server/__init__.py の
_parse_action_prototype(msg)
はmsg
がmahjongsoul_pb2.ActionPrototype
型以外のときreturn msg
で受け取ったmsg
をそのまま返します。develop ブランチ: https://github.com/Cryolite/mahjongsoul_sniffer/blob/develop/api-visualizer/web-server/__init__.py#L118
master ブランチ (リファクタリング後): https://github.com/Cryolite/mahjongsoul_sniffer/blob/master/api-visualizer/web-server/__init__.py#L131
関数呼び出しをたどっていくと、戻り値は最終的に
api_calls[ ]["request"]
とapi_calls[ ]['response']
に代入されています。https://github.com/Cryolite/mahjongsoul_sniffer/blob/master/api-visualizer/web-server/__init__.py#L335
その後
return flask.json.jsonify(api_calls)
でflask.Response
に変換して、フロントエンドに渡しています。parse しなかった
google.protobuf.message.Message
(を継承した) 型の値をそのまま渡す意図はなんですか?Beta Was this translation helpful? Give feedback.
All reactions