aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorRanabir Guin <[email protected]>2021-05-15 00:25:33 -0700
committerAdam Soltys <[email protected]>2021-06-09 16:05:31 -0700
commit2b0879f1831855d0f7260e35acd0f6a20fcd28cb (patch)
treed2a15100e19f70049eafa3152d9996502fc826ff /routes
parent4ce08ea2f828628e86331a109598b954870ae284 (diff)
downloadcoinos-server-2b0879f1831855d0f7260e35acd0f6a20fcd28cb.tar.gz
coinos-server-2b0879f1831855d0f7260e35acd0f6a20fcd28cb.zip
add template for (future) kyc data retrieval
Diffstat (limited to 'routes')
-rw-r--r--routes/admin.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/routes/admin.js b/routes/admin.js
index 8cc93663..50592a60 100644
--- a/routes/admin.js
+++ b/routes/admin.js
@@ -83,4 +83,27 @@ router.get(
})
);
+// usage: GET '/user_kyc'
+//
+// Returns:
+// {
+// users: [
+// <list of user attributes>,
+// kyc: <list of kyc attributes for this user>
+// ]
+router.get(
+ "/user_kyc",
+ auth,
+ ah(async (req, res) => {
+ var kyc = await db.User.findAll({
+ // include: [
+ // { model: db.Kyc, as: 'kyc' }
+ // ]
+ })
+
+ debug('kyc: ' + JSON.stringify(kyc))
+ return res.send({users: kyc})
+ })
+);
+
module.exports = router;