diff --git a/server.py b/server.py index 1939497..34fc64d 100644 --- a/server.py +++ b/server.py @@ -186,22 +186,6 @@ def start_sio_listener(): sio_decorator = cmds.cmds(app, data) await sio_decorator.route2cmd_and_run() - # @app.ctx.sio.on('addMessage') - # @SioDecorator.cmd('gitea', app) - # async def gitea(sqt: SioRequest): - # parser = sqt.parser - # parser.add_argument('-vd', help='绑定QQ与gitea') - # args = parser.parse_args(sqt.args) - # if args.vd: - # state = secrets.token_urlsafe(16) - # user = User(id=sqt.sender_id, name=sqt.sender_name, state=state) - # await user.save() - # url = (f'{app.ctx.sio_config.validate_host}/login/oauth/authorize?' - # f'client_id={app.ctx.sio_config.client_id}&' - # f'redirect_uri={app.ctx.sio_config.localhost}/redirect&' - # f'response_type=code&state={state}') - # return Message(content=f'click: \n{url}') - if __name__ == "__main__": app.run(host='0.0.0.0', port=80, dev=True)