|
|
@@ -865,6 +865,20 @@ func CloudBrainCommitImageShow(ctx *context.Context) { |
|
|
|
ctx.HTML(200, tplCloudBrainImageSubmit) |
|
|
|
} |
|
|
|
|
|
|
|
func GetImage(ctx *context.Context) { |
|
|
|
|
|
|
|
var ID = ctx.Params(":id") |
|
|
|
id, _ := strconv.ParseInt(ID, 10, 64) |
|
|
|
|
|
|
|
image, err := models.GetImageByID(id) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetImageByID failed:%v", err.Error()) |
|
|
|
ctx.JSON(http.StatusNotFound, nil) |
|
|
|
} |
|
|
|
ctx.JSON(http.StatusOK, image) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
func CloudBrainImageEdit(ctx *context.Context) { |
|
|
|
ctx.Data["PageIsImageEdit"] = true |
|
|
|
ctx.Data["PageFrom"] = ctx.Params(":from") |
|
|
|