|
|
@@ -5,6 +5,7 @@ |
|
|
|
package private |
|
|
|
|
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"net/http" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/models" |
|
|
@@ -64,8 +65,9 @@ func DeleteModel(ctx *macaron.Context) { |
|
|
|
|
|
|
|
func ShowModel(ctx *macaron.Context) { |
|
|
|
repoId := ctx.QueryInt64("repoId") |
|
|
|
modelResult, _, err := repo.QueryModelByParameters(repoId, 5) |
|
|
|
modelResult, count, err := repo.QueryModelByParameters(repoId, 5) |
|
|
|
if err == nil { |
|
|
|
log.Info("count=" + fmt.Sprint(count)) |
|
|
|
ctx.JSON(200, modelResult) |
|
|
|
} else { |
|
|
|
ctx.JSON(500, "query error.") |
|
|
|