LOA UI completed (without integration)
This commit is contained in:
12
api/routes/loa.js
Normal file
12
api/routes/loa.js
Normal 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;
|
||||
@@ -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;');
|
||||
|
||||
Reference in New Issue
Block a user