add route for ad-hoc regex evaluations:

This commit is contained in:
fleetside72 2019-01-30 20:25:03 -05:00
parent 6e249a0ccb
commit b8c1535cf8

View File

@ -81,6 +81,13 @@ server.post("/regex", bodyParser.json(), function (inReq, inRes)
Postgres.FirstRow(sql, [JSON.stringify(inReq.body)], inRes);
});
//takes an ad-hoc regex definition in curly braces
server.get("/regex_test", bodyParser.json(), function (inReq, inRes)
{
var sql = "SELECT x.message FROM tps.test_regex_recs($1::jsonb) as x(message)";
Postgres.FirstRow(sql, [JSON.stringify(inReq.body)], inRes);
});
//------------------------------------------------------------mappings---------------------------------------------------------------------------------------------------------------------------------
//list unmapped items flagged to be mapped ?srce=