Skip to content

Commit

Permalink
Merge pull request #212 from wcmc-its/dev_v2_mrj4001
Browse files Browse the repository at this point in the history
Fixed build issue
  • Loading branch information
mrj4001 authored Aug 26, 2022
2 parents 9aa38ea + 3c0ba51 commit 77db33f
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions controllers/db/userroles.controller.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import sequelize from "../../src/db/db";


export const findUserPermissions = async (uid: string) => {

let userRolesList: any = [];
try {

userRolesList = await sequelize.query(
"SELECT au.personIdentifier, roleLabel FROM adminUsers as au INNER JOIN adminUsersRoles as aur "+
"ON au.userID = aur.userID INNER JOIN adminRoles ar ON aur.roleID = ar.roleID WHERE au.personIdentifier = :uId",
{
replacements: {uId : uid},
nest: true,
raw : true
}
);
return JSON.stringify(userRolesList);
} catch (e) {
console.log(e)
}
};











0 comments on commit 77db33f

Please sign in to comment.