EverydayTech Platform - Developer Reference
Complete Source Code Documentation - All Applications
Loading...
Searching...
No Matches
Policies.js
Go to the documentation of this file.
1const db = require("../db");
2
3module.exports = {
4 getPolicy
5};
6
7/**
8 *
9 * @param policyId
10 */
11async function getPolicy(policyId) {
12 const result = await db.query(
13 `SELECT * FROM policies WHERE policy_id = $1`,
14 [policyId]
15 );
16 return result.rows[0];
17}