From 6ba6b3691ac87786e84786ee3a22c7ed3f2a2f29 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 11 Feb 2019 19:38:31 +0000 Subject: [PATCH] setup a rep list route --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index 7ea548d..9f9d0c9 100644 --- a/index.js +++ b/index.js @@ -32,6 +32,11 @@ server.get('/list_sources', function (req,res) { Postgres.FirstRow(sql,[],res); }) +server.get('/rep_list', function (req,res) { + var sql = "select jsonb_agg(quota_rep) from (select distinct quota_rep from rlarp.osm) x"; + Postgres.FirstRow(sql,[],res); +}) + server.get('/', (req,res) => res.send('its running yay 🎡')) server.listen(3000,() => console.log('started'))