application-dp-upgrade #66
@@ -7,7 +7,7 @@ import { MemberState, setUserState } from '../services/memberService';
|
||||
import { getRankByName, insertMemberRank } from '../services/rankService';
|
||||
import { ApplicationFull, CommentRow } from "@app/shared/types/application"
|
||||
import { assignUserToStatus } from '../services/statusService';
|
||||
import { Request, Response } from 'express';
|
||||
import { Request, response, Response } from 'express';
|
||||
import { getUserRoles } from '../services/rolesService';
|
||||
|
||||
// POST /application
|
||||
@@ -157,7 +157,7 @@ router.post('/approve/:id', async (req: Request, res: Response) => {
|
||||
//update user profile
|
||||
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')
|
||||
// await insertMemberRank(app.member_id, nextRank.id);
|
||||
// //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;
|
||||
|
||||
Reference in New Issue
Block a user