createUser endpoint
This commit is contained in:
1 parent
264e6f7d1f
commit
8b7fd826b3
6 files changed
+93
-4
No files matched your search
@@ -17,7 +17,11 @@ interface AddTeamMemberDialogProps {
|
||||
}
|
||||
|
||||
interface RegisterPayload {
|
||||
user: Omit<AddTeamMemberFormData, "confirm">;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
email: string;
|
||||
password: string;
|
||||
role: string[];
|
||||
}
|
||||
|
||||
export const AddTeamMemberDialog = ({
|
||||
@@ -50,9 +54,9 @@ export const AddTeamMemberDialog = ({
|
||||
if (loading) return;
|
||||
|
||||
const { confirm, ...userData } = data;
|
||||
const payload: RegisterPayload = { user: userData };
|
||||
const payload: RegisterPayload = userData;
|
||||
|
||||
const result = await post("/auth/register", payload);
|
||||
const result = await post("/auth/users", payload);
|
||||
|
||||
if (result?.success) {
|
||||
reset();
|
||||
|
||||
Reference in new issue
Block a user