Skip to content

Commit

Permalink
MAT-4169 optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
sb-cecilialiu committed Dec 12, 2024
1 parent 6e63609 commit d204320
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/api/useTerminologyServiceApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,13 @@ export class TerminologyServiceApi {
timeout: 15000,
})
.then((resp) => {
if (resp.status === 200) {
return true;
}
// Check response status and return true if successful
return resp.status === 200;
})
.catch((error) => {
throw error;
// Log the error or handle it as needed
console.error("UMLS Logout failed:", error);
return false;
});
return false;
}
Expand Down

0 comments on commit d204320

Please sign in to comment.