回收站,软删除(三天自动清空),以及默认链接三十分钟失效
This commit is contained in:
@@ -87,9 +87,10 @@ def regenerate_token(
|
||||
) -> KbTokenResponse:
|
||||
svc = KnowledgeBaseService(db)
|
||||
kb, token = svc.regenerate_token(kb_id, user)
|
||||
# 重新生成 = 全新链接,有效期重置为长期
|
||||
svc.set_expiry(kb_id, user, None)
|
||||
return KbTokenResponse(token=token, ai_url=f"/k/{token}", token_hint=kb.token_hint)
|
||||
return KbTokenResponse(
|
||||
token=token, ai_url=f"/k/{token}", token_hint=kb.token_hint,
|
||||
expires_at=kb.token_expires_at, is_expired=False,
|
||||
)
|
||||
|
||||
|
||||
@router.post("/{kb_id}/enable", response_model=KbResponse)
|
||||
|
||||
Reference in New Issue
Block a user