protocol base data
This commit is contained in:
parent
5c4e521bd8
commit
edc35f2f87
7 changed files with 73 additions and 1 deletions
|
@ -20,3 +20,16 @@ export async function getAllProtocols(req: Request, res: Response): Promise<any>
|
|||
count: count,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @description get protocol by id
|
||||
* @param req {Request} Express req object
|
||||
* @param res {Response} Express res object
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
export async function getProtocolById(req: Request, res: Response): Promise<any> {
|
||||
let id = parseInt(req.params.id);
|
||||
let protocol = await ProtocolService.getById(id);
|
||||
|
||||
res.json(ProtocolFactory.mapToSingle(protocol));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue