Skip to content

Commit

Permalink
feat(frontend): fix mongodb to work without user
Browse files Browse the repository at this point in the history
  • Loading branch information
hkdeman committed Sep 25, 2024
1 parent 41a3ea5 commit 76f9f3f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions frontend/src/pages/auth/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ export const LoginPage: FC = () => {
const handleSubmit = useCallback(() => {
if (([DatabaseType.MySql, DatabaseType.Postgres].includes(databaseType.id as DatabaseType) && (hostName.length === 0 || database.length === 0 || username.length === 0))
|| (databaseType.id === DatabaseType.Sqlite3 && database.length === 0)
|| (databaseType.id === DatabaseType.MongoDb && (hostName.length === 0 || username.length === 0))
|| (databaseType.id === DatabaseType.Redis && (hostName.length === 0))) {
|| ((databaseType.id === DatabaseType.MongoDb || databaseType.id === DatabaseType.Redis) && (hostName.length === 0))) {
return setError("All fields are required");
}
setError(undefined);
Expand Down

0 comments on commit 76f9f3f

Please sign in to comment.