Admin navigation permissions
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import pool from '../db';
|
||||
import { Role } from '@app/shared/types/roles'
|
||||
|
||||
export async function assignUserGroup(userID: number, roleID: number) {
|
||||
|
||||
@@ -16,7 +17,7 @@ export async function createGroup(name: string, color: string, description: stri
|
||||
return { id: result.insertId, name, color, description };
|
||||
}
|
||||
|
||||
export async function getUserRoles(userID: number) {
|
||||
export async function getUserRoles(userID: number): Promise<Role[]> {
|
||||
const sql = `SELECT r.id, r.name
|
||||
FROM members_roles mr
|
||||
INNER JOIN roles r ON mr.role_id = r.id
|
||||
|
||||
Reference in New Issue
Block a user