refactor: reorganize imports in course route and update middleware for course tags endpoint

This commit is contained in:
Rotimi Best
2026-03-12 22:16:51 +01:00
parent 4fe4fc168d
commit 420409722a
5 changed files with 30 additions and 14 deletions
@@ -4,6 +4,7 @@ import { and, eq } from 'drizzle-orm';
import { User } from 'better-auth';
import { db } from '@db/drizzle';
import { markUserAndProfileEmailVerified } from '@db/queries/auth';
const DEFAULT_STUDENT_ROLE_ID = 3;
@@ -60,6 +61,8 @@ export async function ensureOrgMembership(
updatedAt: new Date().toISOString()
})
.where(eq(schema.organizationInvite.id, invite.id));
await markUserAndProfileEmailVerified(userId, tx);
});
console.debug('User joined org via invite:', orgId);