LOA UI completed (without integration)

This commit is contained in:
2025-09-15 18:32:20 -04:00
parent 456c29a731
commit 303b72a160
33 changed files with 984 additions and 7 deletions

12
api/routes/loa.js Normal file
View File

@@ -0,0 +1,12 @@
const express = require('express');
const router = express.Router();
// DB pool (same as used in api/index.js)
const pool = require('../db');
//post a new LOA
router.post("/", async (req, res) => {
})
module.exports = router;

View File

@@ -4,12 +4,7 @@ const ur = express.Router();
const pool = require('../db');
// Placeholder router for rank-related routes.
// Implement rank endpoints here, for example:
// router.get('/', async (req, res) => { /* ... */ });
// router.post('/change', async (req, res) => { /* ... */ });
//insert a new latest role for a user
//insert a new latest rank for a user
ur.post('/', async (req, res) => {
try {
const App = req.body?.App || {};
@@ -33,6 +28,7 @@ ur.post('/', async (req, res) => {
}
});
//get all ranks
r.get('/', async (req, res) => {
try {
const result = await pool.query('SELECT id, name, short_name, sort_id FROM ranks;');