|
|
@@ -2,7 +2,7 @@ package routers |
|
|
|
|
|
|
|
import ( |
|
|
|
"code.gitea.io/gitea/modules/context" |
|
|
|
"github.com/olivere/elastic" |
|
|
|
"github.com/olivere/elastic/v7" |
|
|
|
) |
|
|
|
|
|
|
|
type Table struct { |
|
|
@@ -39,6 +39,6 @@ func Search(ctx *context.Context) { |
|
|
|
panic(err) |
|
|
|
} |
|
|
|
|
|
|
|
res, err := client.Search(TableName + "-es-index").Do(ctx) |
|
|
|
res, err := client.Search(TableName + "-es-index").Do(ctx.Req.Context()) |
|
|
|
ctx.JSON(200, res) |
|
|
|
} |