Skip to content

Commit 884a074

Browse files
clucraftclaude
andcommitted
Fix first user registration not calling register endpoint
When isFirstUser is true, the form displayed "Create Admin Account" but still called the login endpoint instead of register. Now checks both isRegister and isFirstUser to determine which endpoint to call. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a0cc1b1 commit 884a074

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

client/src/pages/Login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function Login({ onLogin }: LoginProps) {
4545
setLoading(true);
4646

4747
try {
48-
if (isRegister) {
48+
if (isRegister || isFirstUser) {
4949
const response = await authApi.register(email, password, name);
5050
setIsRegister(false);
5151
setError('');

0 commit comments

Comments
 (0)