@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.
@@ -1,5 +1,5 @@
1
- export { getCurrentSession, hasRole, normalizeCallbackUrl, requireAuth, requireRole } from '../chunk-VVXYKVFJ.mjs';
2
- import '../chunk-K2GCSLRJ.mjs';
1
+ export { getCurrentSession, hasRole, normalizeCallbackUrl, requireAuth, requireRole } from '../chunk-YHQ4A5RF.mjs';
2
+ import '../chunk-ONJDPUVO.mjs';
3
3
  import '../chunk-O5EQYHNC.mjs';
4
4
  import '../chunk-6OAHCEDJ.mjs';
5
5
  import '../chunk-2BJ3B4FR.mjs';
@@ -1243,6 +1243,7 @@ async function promoteFirstAdmin(user) {
1243
1243
  const [existing] = await db.select({ id: users.id }).from(users).where(drizzleOrm.eq(users.role, "admin")).limit(1);
1244
1244
  if (existing) return;
1245
1245
  await db.update(users).set({ role: "admin" }).where(drizzleOrm.eq(users.id, user.id));
1246
+ user.role = "admin";
1246
1247
  }
1247
1248
  function createAuth(overrides = {}) {
1248
1249
  var _a, _b, _c, _d, _e, _f, _g;