From 02564c8426a9f9d8d1b9b64dba7f5b3212ae6e76 Mon Sep 17 00:00:00 2001 From: Carlos Mesquita Date: Sun, 8 Sep 2024 22:47:43 +0100 Subject: [PATCH] Had the type hardcoded --- src/pages/(admin)/BatchCreateUser.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/(admin)/BatchCreateUser.tsx b/src/pages/(admin)/BatchCreateUser.tsx index 53ff716a..5f31c7c3 100644 --- a/src/pages/(admin)/BatchCreateUser.tsx +++ b/src/pages/(admin)/BatchCreateUser.tsx @@ -161,7 +161,7 @@ export default function BatchCreateUser({user, users, permissions, onFinish}: Pr setIsLoading(true); try { - await axios.post("/api/batch_users", { users: newUsers.map(user => ({...user, type: "superadmin", expiryDate})) }); + await axios.post("/api/batch_users", { users: newUsers.map(user => ({...user, type, expiryDate})) }); toast.success(`Successfully added ${newUsers.length} user(s)!`); onFinish(); } catch {