forked from syntaxbullet/AuroraBot-discord
feat: Implement graphical student ID card generation for user profiles.
This commit is contained in:
@@ -25,7 +25,12 @@ export const classService = {
|
||||
};
|
||||
return tx ? await execute(tx) : await DrizzleClient.transaction(execute);
|
||||
},
|
||||
|
||||
getClassBalance: async (classId: bigint) => {
|
||||
const cls = await DrizzleClient.query.classes.findFirst({
|
||||
where: eq(classes.id, classId),
|
||||
});
|
||||
return cls?.balance || 0n;
|
||||
},
|
||||
modifyClassBalance: async (classId: bigint, amount: bigint, tx?: any) => {
|
||||
const execute = async (txFn: any) => {
|
||||
const cls = await txFn.query.classes.findFirst({
|
||||
|
||||
Reference in New Issue
Block a user