🐛 fix(auth.py): set AUTO_LOGIN to False to disable automatic login as a super user
🐛 fix(API/index.ts): add null check for response object before checking status to prevent potential error
This commit is contained in:
parent
acd661f629
commit
6c03edc50a
2 changed files with 3 additions and 3 deletions
|
|
@ -163,7 +163,7 @@ export async function updateFlowInDatabase(
|
|||
export async function readFlowsFromDatabase() {
|
||||
try {
|
||||
const response = await api.get(`${BASE_URL_API}flows/`);
|
||||
if (response.status !== 200) {
|
||||
if (response?.status !== 200) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
return response.data;
|
||||
|
|
@ -176,7 +176,7 @@ export async function readFlowsFromDatabase() {
|
|||
export async function downloadFlowsFromDatabase() {
|
||||
try {
|
||||
const response = await api.get(`${BASE_URL_API}flows/download/`);
|
||||
if (response.status !== 200) {
|
||||
if (response?.status !== 200) {
|
||||
throw new Error(`HTTP error! status: ${response.status}`);
|
||||
}
|
||||
return response.data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue