placeholdered CoC getter until CoC page exists on bookstack

This commit is contained in:
2025-12-11 22:05:46 -05:00
parent 0a1704b60b
commit c74b5b280b

View File

@@ -7,7 +7,7 @@ import { MemberState, setUserState } from '../services/memberService';
import { getRankByName, insertMemberRank } from '../services/rankService'; import { getRankByName, insertMemberRank } from '../services/rankService';
import { ApplicationFull, CommentRow } from "@app/shared/types/application" import { ApplicationFull, CommentRow } from "@app/shared/types/application"
import { assignUserToStatus } from '../services/statusService'; import { assignUserToStatus } from '../services/statusService';
import { Request, Response } from 'express'; import { Request, response, Response } from 'express';
import { getUserRoles } from '../services/rolesService'; import { getUserRoles } from '../services/rolesService';
// POST /application // POST /application
@@ -157,7 +157,7 @@ router.post('/approve/:id', async (req: Request, res: Response) => {
//update user profile //update user profile
await setUserState(app.member_id, MemberState.Member); await setUserState(app.member_id, MemberState.Member);
await pool.query('CALL sp_accept_new_recruit(?, ?, ?, ?)', [Number(process.env.CONFIG_ID), app.member_id, approved_by, approved_by]) await pool.query('CALL sp_accept_new_recruit_validation(?, ?, ?, ?)', [Number(process.env.CONFIG_ID), app.member_id, approved_by, approved_by])
// let nextRank = await getRankByName('Recruit') // let nextRank = await getRankByName('Recruit')
// await insertMemberRank(app.member_id, nextRank.id); // await insertMemberRank(app.member_id, nextRank.id);
// //assign user to "pending basic" // //assign user to "pending basic"
@@ -283,4 +283,20 @@ router.post('/restart', async (req: Request, res: Response) => {
} }
}) })
// router.get('/coc', async (req: Request, res: Response) => {
// const output = await fetch(`${process.env.DOC_HOST}/api/pages/`, {
// headers: {
// Authorization: `Token ${process.env.DOC_TOKEN_ID}:${process.env.DOC_TOKEN_SECRET}`,
// }
// })
// if (output.ok) {
// const out = await output.json();
// res.status(200).json(out.html);
// } else {
// console.error("Failed to fetch LOA policy from bookstack");
// res.sendStatus(500);
// }
// })
module.exports = router; module.exports = router;