From 28c10c9747ebcd8b46bc7c30705ce8e62d37faa3 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 16 Nov 2017 20:43:26 +0000 Subject: [PATCH] Add VERSION query param support to REST GET route --- web/routes.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/routes.go b/web/routes.go index 3a76cefc..577e15a9 100644 --- a/web/routes.go +++ b/web/routes.go @@ -195,12 +195,13 @@ func routes(s *fibre.Fibre) { s.Get("/key/:class", func(c *fibre.Context) error { - txt := "SELECT * FROM $class LIMIT $limit START $start" + txt := "SELECT * FROM $class LIMIT $limit START $start VERSION $versn" res, err := db.Execute(c, txt, map[string]interface{}{ "class": sql.NewTable(c.Param("class")), "limit": limit(c, 100), "start": start(c, 0), + "versn": versn(c, time.Now()), }) return show.Output(c, c.Param("class"), show.Many, show.Select, res, err)