fix: 日志导出响应类型推到

This commit is contained in:
TsMask
2023-11-22 09:35:54 +08:00
parent c49da78996
commit 6ecd98650b

View File

@@ -249,7 +249,7 @@ export async function exportLog(query: Record<string, any>) {
order begin_time,end_time`;
}
if (!querySQL) {
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR, data: [] };
}
// 发起请求
const result = await request({
@@ -286,7 +286,7 @@ export async function backupLog(logType: string) {
result.data = v;
return result;
} else {
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR, data: 0 };
}
}
return result;