feat: Implement graphical student ID card generation for user profiles.

This commit is contained in:
syntaxbullet
2025-12-08 22:33:01 +01:00
parent 4d553ddc91
commit bcfd254071
9 changed files with 159 additions and 17 deletions

View File

@@ -32,6 +32,13 @@ export const userService = {
};
return tx ? await execute(tx) : await DrizzleClient.transaction(execute);
},
getUserClass: async (id: string) => {
const user = await DrizzleClient.query.users.findFirst({
where: eq(users.id, BigInt(id)),
with: { class: true }
});
return user?.class;
},
createUser: async (id: string | bigint, username: string, classId?: bigint, tx?: any) => {
const execute = async (txFn: any) => {
const [user] = await txFn.insert(users).values({