Browse Source

修改接口。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.10.1^2
zouap 3 years ago
parent
commit
c8e0d6d16f
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      routers/repo/aisafety.go

+ 4
- 4
routers/repo/aisafety.go View File

@@ -82,13 +82,13 @@ func GetAiSafetyTaskTmpl(ctx *context.Context) {

func GetAiSafetyTask(ctx *context.Context) {
var ID = ctx.Params(":jobid")
job, err := models.GetCloudbrainByJobIDWithDeleted(ID)
job, err := models.GetCloudbrainByIDWithDeleted(ID)
if err != nil {
log.Error("GetCloudbrainByJobID failed:" + err.Error())
return
}
syncAiSafetyTaskStatus(job)
job, err = models.GetCloudbrainByJobIDWithDeleted(ID)
job, err = models.GetCloudbrainByIDWithDeleted(ID)
job.BenchmarkType = "CV"
job.BenchmarkTypeName = "Classification"
ctx.JSON(200, job)
@@ -96,7 +96,7 @@ func GetAiSafetyTask(ctx *context.Context) {

func StopAiSafetyTask(ctx *context.Context) {
var ID = ctx.Params(":jobid")
task, err := models.GetCloudbrainByJobIDWithDeleted(ID)
task, err := models.GetCloudbrainByIDWithDeleted(ID)
result := make(map[string]interface{})
result["code"] = -1
if err != nil {
@@ -159,7 +159,7 @@ func StopAiSafetyTask(ctx *context.Context) {

func DelAiSafetyTask(ctx *context.Context) {
var ID = ctx.Params(":jobid")
task, err := models.GetCloudbrainByJobIDWithDeleted(ID)
task, err := models.GetCloudbrainByIDWithDeleted(ID)
result := make(map[string]interface{})
result["code"] = 1
if err != nil {


Loading…
Cancel
Save