11 lines
476 B
Python
11 lines
476 B
Python
from flask import current_app
|
|
from ..models.function import FunctionResponse
|
|
|
|
def next_chapter(user_uuid):
|
|
try:
|
|
ex = current_app.extensions
|
|
user_uuid2chatmanager = ex["user_uuid2chatmanager"]
|
|
user_uuid2chatmanager[user_uuid].next_chapter()
|
|
return FunctionResponse("next_chapter", True, "成功进入下一章")
|
|
except Exception as e:
|
|
return FunctionResponse("next_chapter", False, f"进入下一章发生意外错误: {str(e)}") |