add route for ad-hoc regex evaluations:
This commit is contained in:
		
							parent
							
								
									6e249a0ccb
								
							
						
					
					
						commit
						b8c1535cf8
					
				| @ -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=
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user