mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-05-06 20:42:52 +08:00
refactor(backend): 修改系统初始化和健康检查相关逻辑
- 更新 BackendInitDialog 组件中的提示信息,增加报错提示 - 在 config 路由中添加 sys_check 接口,用于系统检查 - 修改 useCheckBackend钩子,使用新的 sys_check接口进行系统检查
This commit is contained in:
@@ -15,7 +15,7 @@ interface Props {
|
||||
后端正在初始化中…
|
||||
</DialogTitle>
|
||||
</DialogHeader>
|
||||
<p className="text-muted-foreground mt-2">请稍候,系统正在启动后端服务</p>
|
||||
<p className="text-muted-foreground mt-2">请稍候,系统正在启动后端服务,出现报错属于正常现象</p>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@ export const useCheckBackend = () => {
|
||||
|
||||
const check = async () => {
|
||||
try {
|
||||
await request.get('/sys_health')
|
||||
await request.get('/sys_check')
|
||||
setInitialized(true)
|
||||
setLoading(false)
|
||||
} catch {
|
||||
|
||||
@@ -39,3 +39,7 @@ async def sys_health():
|
||||
return R.success()
|
||||
except EnvironmentError:
|
||||
return R.error(msg="系统未安装 ffmpeg 请先进行安装")
|
||||
|
||||
@router.get("/sys_check")
|
||||
async def sys_check():
|
||||
return R.success()
|
||||
Reference in New Issue
Block a user