@xk2800/nextjs-template 0.7.2-beta.2 → 0.7.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1246,6 +1246,7 @@ async function promoteFirstAdmin(user) {
1246
1246
  const [existing] = await db.select({ id: users.id }).from(users).where(drizzleOrm.eq(users.role, "admin")).limit(1);
1247
1247
  if (existing) return;
1248
1248
  await db.update(users).set({ role: "admin" }).where(drizzleOrm.eq(users.id, user.id));
1249
+ user.role = "admin";
1249
1250
  }
1250
1251
  function createAuth(overrides = {}) {
1251
1252
  var _a, _b, _c, _d, _e, _f, _g;