forked from open-webui/open-webui
Merge pull request #1791 from cheahjs/feat/external-db-support
feat: add support for using postgres for the backend DB
This commit is contained in:
commit
c1d85f8a6f
19 changed files with 350 additions and 24 deletions
|
@ -83,9 +83,9 @@ export const downloadDatabase = async (token: string) => {
|
|||
Authorization: `Bearer ${token}`
|
||||
}
|
||||
})
|
||||
.then((response) => {
|
||||
.then(async (response) => {
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
throw await response.json();
|
||||
}
|
||||
return response.blob();
|
||||
})
|
||||
|
@ -100,7 +100,11 @@ export const downloadDatabase = async (token: string) => {
|
|||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
error = err;
|
||||
error = err.detail;
|
||||
return null;
|
||||
});
|
||||
|
||||
if (error) {
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue