|
|
@@ -5,6 +5,7 @@ |
|
|
|
package private |
|
|
|
|
|
|
|
import ( |
|
|
|
"encoding/json" |
|
|
|
"fmt" |
|
|
|
"net/http" |
|
|
|
|
|
|
@@ -68,7 +69,9 @@ func ShowModel(ctx *macaron.Context) { |
|
|
|
modelResult, count, err := repo.QueryModelByParameters(repoId, 5) |
|
|
|
if err == nil { |
|
|
|
log.Info("count=" + fmt.Sprint(count)) |
|
|
|
ctx.JSON(200, modelResult) |
|
|
|
modelResultjson, _ := json.Marshal(modelResult) |
|
|
|
|
|
|
|
ctx.JSON(200, (string(modelResultjson))) |
|
|
|
} else { |
|
|
|
ctx.JSON(500, "query error.") |
|
|
|
} |
|
|
|