Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/1036/head
zouap 3 years ago
parent
commit
944b6f879b
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      routers/private/tool.go

+ 4
- 4
routers/private/tool.go View File

@@ -5,7 +5,6 @@
package private

import (
"encoding/json"
"fmt"
"net/http"

@@ -66,12 +65,13 @@ func DeleteModel(ctx *macaron.Context) {

func ShowModel(ctx *macaron.Context) {
repoId := ctx.QueryInt64("repoId")
modelResult, count, err := repo.QueryModelByParameters(repoId, 5)
page := ctx.QueryInt("page")
modelResult, count, err := repo.QueryModelByParameters(repoId, page)
if err == nil {
log.Info("count=" + fmt.Sprint(count))
modelResultjson, _ := json.Marshal(modelResult)
//modelResultjson, _ := json.Marshal(modelResult)

ctx.JSON(200, (string(modelResultjson)))
ctx.JSON(200, modelResult)
} else {
ctx.JSON(500, "query error.")
}


Loading…
Cancel
Save