public
anord
read
Ledger
Why work hard when you can work easier?
Languages
Repository composition by tracked source files.
TypeScript
86%
CSS
10%
SQL
3%
Shell
1%
HTML
0%
Trace
apps/api/src/http/routes/roles.ts
Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.
Author
Date
Commit
Line
Code
1
import { Router } from "express";
2
import { pool } from "../../db/pool.js";
4
export const rolesRouter = Router();
6
rolesRouter.get("/", async (_req, res) => {
7
const result = await pool.query(`SELECT id, key, name FROM roles ORDER BY created_at ASC`);
8
return res.json({ roles: result.rows });
9
});