Browse Source

Merge branch 'fix-323' of https://git.openi.org.cn/OpenI/aiforge into fix-323

pull/1839/head
zhoupzh 3 years ago
parent
commit
c3b00163e7
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      routers/repo/cloudbrain.go

+ 9
- 9
routers/repo/cloudbrain.go View File

@@ -465,15 +465,15 @@ func CloudBrainImageEdit(ctx *context.Context) {
if err != nil {
log.Error("GetImageByID failed:%v", err.Error())
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)

image, err := models.GetImageByID(id)
if err != nil {
log.Error("GetImageByID failed:%v", err.Error())
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
}
ctx.Data["Image"] = image
ctx.HTML(http.StatusOK, tplCloudBrainImageEdit)
}
image, err := models.GetImageByID(id)
if err != nil {
log.Error("GetImageByID failed:%v", err.Error())
ctx.NotFound(ctx.Req.URL.RequestURI(), nil)
}
ctx.Data["Image"] = image
ctx.HTML(http.StatusOK, tplCloudBrainImageEdit)

}

func CloudBrainImageEditPost(ctx *context.Context, form auth.EditImageCloudBrainForm) {
@@ -815,7 +815,7 @@ func CloudBrainShowModels(ctx *context.Context) {
func GetPublicImages(ctx *context.Context) {

opts := models.SearchImageOptions{
IncludePrivateOnly: true,
IncludePublicOnly: true,
UID: -1,
Keyword: ctx.Query("q"),
Topics: ctx.Query("topic"),


Loading…
Cancel
Save