diff --git a/internal/http/router.go b/internal/http/router.go index ec0b490..adb5993 100644 --- a/internal/http/router.go +++ b/internal/http/router.go @@ -72,4 +72,8 @@ func populate(web, api *gin.RouterGroup) { web.GET("/connections/tree", func(c *gin.Context) { c.String(200, database.TableTree(c)) }) + + // This should return an HTML template which will be used to auto or not + // auto send the query to the server. + web.GET("/query/auto", templates.ToggleQueryType) } diff --git a/internal/templates/query.go b/internal/templates/query.go new file mode 100644 index 0000000..e199e23 --- /dev/null +++ b/internal/templates/query.go @@ -0,0 +1,51 @@ +package templates + +import ( + "github.com/gin-gonic/gin" +) + +const MANUAL_QUERY string = ` +