allow next_chapter exception
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
from flask import current_app
|
from flask import current_app
|
||||||
|
from ..models.function import FunctionResponse
|
||||||
|
|
||||||
def next_chapter(user_uuid):
|
def next_chapter(user_uuid):
|
||||||
ex = current_app.extensions
|
try:
|
||||||
user_uuid2chatmanager = ex["user_uuid2chatmanager"]
|
ex = current_app.extensions
|
||||||
user_uuid2chatmanager[user_uuid].next_chapter()
|
user_uuid2chatmanager = ex["user_uuid2chatmanager"]
|
||||||
return "成功进入下一章"
|
user_uuid2chatmanager[user_uuid].next_chapter()
|
||||||
|
return FunctionResponse("next_chapter", True, "成功进入下一章")
|
||||||
|
except Exception as e:
|
||||||
|
return FunctionResponse("next_chapter", False, f"进入下一章发生意外错误: {str(e)}")
|
||||||
Reference in New Issue
Block a user