Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 627f4d82

Přidáno uživatelem Michal Schwob před asi 2 roky(ů)

Fixed registering a closing the dialog after success
re #9627

Zobrazit rozdíly:

frontend/src/features/Auth/userThunks.ts
16 16
}
17 17

  
18 18
export interface UserRegister {
19
    username: string,
19
    name: string,
20 20
    passwords: {
21 21
        password: string,
22 22
        confirmationPassword: string,
......
58 58
                username: sub,
59 59
                roles: authorities,
60 60
                isLoggingIn: false,
61
                isLoggedIn: true
61
                isLoggedIn: true,
62
                isRegistered: false
62 63
            }
63 64
            
64 65
            return userState
......
77 78
            const { data, status } = await axiosInstance.post('/users', userDto)
78 79
            if (status !== 200) {
79 80
                // TODO read API err
80
                return Promise.reject(loginError)
81
                return Promise.reject(registerError)
81 82
            }
82 83
            return status
83 84
        } catch (err: any) {
84
            return Promise.reject(loginError)
85
            return Promise.reject(registerError)
85 86
        }
86 87
    }
87 88
)

Také k dispozici: Unified diff