Code refactoring

- Code refactoring
- Fix a bug that the other player will not become the host of the room at once, when the player disconnect in link play.

> Maybe add many unknown bugs. XD
> The song database `arcsong.db` will not used in the future. You can use a tool in `tool` folder to import old data.
This commit is contained in:
Lost-MSth
2022-07-04 18:36:30 +08:00
parent 9de62d3645
commit 6fcca17918
49 changed files with 3663 additions and 3660 deletions

View File

@@ -59,8 +59,8 @@ def error_return(e: ArcError = default_error): # 错误返回
return jsonify(r)
def success_return(value):
return jsonify({
"success": True,
"value": value
})
def success_return(value=None):
r = {"success": True}
if value is not None:
r['value'] = value
return jsonify(r)