Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/1788/head
zouap 3 years ago
parent
commit
20ff1b39bd
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      routers/search.go

+ 2
- 2
routers/search.go View File

@@ -2,7 +2,7 @@ package routers


import ( import (
"code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/context"
"github.com/olivere/elastic"
"github.com/olivere/elastic/v7"
) )


type Table struct { type Table struct {
@@ -39,6 +39,6 @@ func Search(ctx *context.Context) {
panic(err) 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) ctx.JSON(200, res)
} }

Loading…
Cancel
Save