feat(produser): added in the function to create a standard user based on there username

This commit is contained in:
2025-06-12 21:10:46 -05:00
parent 3283972809
commit 99ad79c662
13 changed files with 438 additions and 35 deletions

View File

@@ -0,0 +1,23 @@
import { db } from "../../../../database/dbclient.js";
import { prodPermissions } from "../../../../database/schema/prodPermissions.js";
import { tryCatch } from "../../../globalUtils/tryCatch.js";
export const getProdRoles = async () => {
const { data, error } = (await tryCatch(
db.select().from(prodPermissions)
)) as any;
if (error) {
return {
success: false,
message: "Error getting prod permissions",
data: error,
};
}
return {
success: true,
message: "Current prod permissions",
data: data,
};
};