mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-14 19:21:46 +03:00
Use table name from url params
This commit is contained in:
parent
90e9e051de
commit
26de09a2cd
2
main.go
2
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))
|
||||
|
Loading…
Reference in New Issue
Block a user