浏览代码

api/repo: response full API format for search results (#4522)

Unknwon 7 年之前
父节点
当前提交
09f2cbfb18
共有 3 个文件被更改,包括 3 次插入6 次删除
  1. 1 1
      gogs.go
  2. 1 4
      routers/api/v1/repo/repo.go
  3. 1 1
      templates/.VERSION

+ 1 - 1
gogs.go

@@ -16,7 +16,7 @@ import (
 	"github.com/gogits/gogs/pkg/setting"
 )
 
-const APP_VER = "0.11.17.0607"
+const APP_VER = "0.11.18.0608"
 
 func init() {
 	setting.AppVer = APP_VER

+ 1 - 4
routers/api/v1/repo/repo.go

@@ -65,10 +65,7 @@ func Search(c *context.APIContext) {
 			})
 			return
 		}
-		results[i] = &api.Repository{
-			ID:       repos[i].ID,
-			FullName: path.Join(repos[i].Owner.Name, repos[i].Name),
-		}
+		results[i] = repos[i].APIFormat(nil)
 	}
 
 	c.SetLinkHeader(int(count), setting.API.MaxResponseItems)

+ 1 - 1
templates/.VERSION

@@ -1 +1 @@
-0.11.17.0607
+0.11.18.0608