first commit
This commit is contained in:
12
backend/list-accounts.ts
Normal file
12
backend/list-accounts.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import * as dotenv from 'dotenv';
|
||||
dotenv.config();
|
||||
import pool from './src/config/database';
|
||||
|
||||
async function run() {
|
||||
const [rows] = await pool.query<any[]>(
|
||||
"SELECT username, name, role, department, position FROM user WHERE role IN ('manager','generalManager') ORDER BY role"
|
||||
);
|
||||
console.table(rows);
|
||||
await pool.end();
|
||||
}
|
||||
run().catch(console.error);
|
||||
Reference in New Issue
Block a user