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:
Timothy Jaeryang Baek
2024-04-27 12:48:56 -07:00
committed by GitHub
19 changed files with 350 additions and 24 deletions
+7 -3
View File
@@ -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;
}
};