mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
perf: Optimizing the Design of Embedded Pages
This commit is contained in:
@@ -112,7 +112,7 @@ async def clear_ui_cache(id: int):
|
||||
|
||||
@router.get("", response_model=list[AssistantModel])
|
||||
async def query(session: SessionDep):
|
||||
list_result = session.exec(select(AssistantModel).where(AssistantModel.type.in_([0, 1])).order_by(AssistantModel.name, AssistantModel.create_time)).all()
|
||||
list_result = session.exec(select(AssistantModel).where(AssistantModel.type != 4).order_by(AssistantModel.name, AssistantModel.create_time)).all()
|
||||
return list_result
|
||||
|
||||
@router.post("")
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import secrets
|
||||
import string
|
||||
|
||||
def get_random_string(length=16):
|
||||
alphabet = string.ascii_letters + string.digits
|
||||
return ''.join(secrets.choice(alphabet) for _ in range(length))
|
||||
Reference in New Issue
Block a user