From 26de09a2cd82e540dc299dcb9b3ec3caf0ef224b Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Thu, 9 Oct 2014 23:48:07 -0500 Subject: [PATCH] Use table name from url params --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 9c99e29..5c21346 100644 --- a/main.go +++ b/main.go @@ -154,7 +154,7 @@ func API_GetTables(c *gin.Context) { func API_GetTable(c *gin.Context) { var columns []map[string]interface{} - res, err := dbClient.Query(fmt.Sprintf(SQL_TABLE_SCHEMA, "users")) + res, err := dbClient.Query(fmt.Sprintf(SQL_TABLE_SCHEMA, c.Params.ByName("name"))) if err != nil { c.JSON(400, NewError(err))