Browse Source

Merge pull request '云脑1调试任务针对游客做部分操作限制' (#668) from cb-debug into V20211101

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/668
Reviewed-by: ychao_1983 <ychao_1983@sina.com>
tags/v1.21.11.1
ychao_1983 4 years ago
parent
commit
23994e90fd
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      routers/repo/cloudbrain.go

+ 10
- 0
routers/repo/cloudbrain.go View File

@@ -321,6 +321,11 @@ func CloudBrainShow(ctx *context.Context) {

func CloudBrainDebug(ctx *context.Context) {
var jobID = ctx.Params(":jobid")
if !ctx.IsSigned {
log.Error("the user has not signed in")
ctx.Error(http.StatusForbidden, "","the user has not signed in")
return
}
task, err := models.GetCloudbrainByJobID(jobID)
if err != nil {
ctx.ServerError("GetCloudbrainByJobID failed", err)
@@ -333,6 +338,11 @@ func CloudBrainDebug(ctx *context.Context) {

func CloudBrainCommitImage(ctx *context.Context, form auth.CommitImageCloudBrainForm) {
var jobID = ctx.Params(":jobid")
if !ctx.IsSigned {
log.Error("the user has not signed in")
ctx.Error(http.StatusForbidden, "","the user has not signed in")
return
}
task, err := models.GetCloudbrainByJobID(jobID)
if err != nil {
ctx.JSON(200, map[string]string{


Loading…
Cancel
Save