mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 16:59:42 +00:00
refac
This commit is contained in:
parent
e0fc3e89a7
commit
6fdfa62845
@ -308,15 +308,19 @@
|
||||
|
||||
// Helper function to maintain file paths within zip
|
||||
const syncDirectoryHandler = async () => {
|
||||
const res = await resetKnowledgeById(localStorage.token, id).catch((e) => {
|
||||
toast.error(e);
|
||||
});
|
||||
if ((knowledge?.files ?? []).length > 0) {
|
||||
const res = await resetKnowledgeById(localStorage.token, id).catch((e) => {
|
||||
toast.error(e);
|
||||
});
|
||||
|
||||
if (res) {
|
||||
knowledge = res;
|
||||
toast.success($i18n.t('Knowledge reset successfully.'));
|
||||
if (res) {
|
||||
knowledge = res;
|
||||
toast.success($i18n.t('Knowledge reset successfully.'));
|
||||
|
||||
// Upload directory
|
||||
// Upload directory
|
||||
uploadDirectoryHandler();
|
||||
}
|
||||
} else {
|
||||
uploadDirectoryHandler();
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user