Do not login as a new user after creation
This commit is contained in:
@@ -46,7 +46,6 @@ export const createUser = async (email: string, password: string): Promise<{ suc
|
|||||||
try {
|
try {
|
||||||
const res = await api.post<ApiResponse<{ user: User, token: string }>>('/auth/register', { email, password });
|
const res = await api.post<ApiResponse<{ user: User, token: string }>>('/auth/register', { email, password });
|
||||||
if (res.success && res.data) {
|
if (res.success && res.data) {
|
||||||
setAuthToken(res.data.token);
|
|
||||||
return { success: true };
|
return { success: true };
|
||||||
}
|
}
|
||||||
return { success: false, error: res.error };
|
return { success: false, error: res.error };
|
||||||
|
|||||||
Reference in New Issue
Block a user