Skip to content

Commit

Permalink
Wrong endpoint update fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Nov 26, 2024
1 parent f3fd3ff commit 596a0ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modules/aql/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import (
func init() {
// AQL support
frontend.AddOption(func(ws *frontend.WebService) error {
ws.Router.GET("/aql/validatequery", func(c *gin.Context) {
aql := ws.API.Group("aql")
aql.GET("validatequery", func(c *gin.Context) {
querytext := strings.Trim(c.Query("query"), " \n\r")
if querytext != "" {
_, err := ParseAQLQuery(querytext, ws.Objs)
Expand All @@ -31,7 +32,7 @@ func init() {
})

// Graph based query analysis - core functionality
ws.API.POST("/aql/analyze", func(c *gin.Context) {
aql.POST("analyze", func(c *gin.Context) {
params := make(map[string]any)
err := c.ShouldBindBodyWith(&params, binding.JSON)

Expand Down

0 comments on commit 596a0ee

Please sign in to comment.