Commit 8ee233d0 authored by brent's avatar brent

modify client api

parent fcb32eb6
......@@ -16,6 +16,7 @@ import (
"math/big"
"net/http"
"strconv"
"strings"
"time"
)
......@@ -505,11 +506,11 @@ func (server *ClientController) TaskReward() {
for _, task := range types {
if task.Id == item.TaskId {
item.Type = models.ModelType(task.Type).String()
if strings.Compare(item.Type, "unknown") == 0 {
item.Type = "base task"
}
item.BaseModel = task.BaseModel
}
if task.Id == 998 {
item.Type = "base task"
}
}
workload := big.NewInt(item.Workload)
weiPerWorkload, _ := strconv.Atoi(value.Wei)
......
......@@ -14,6 +14,7 @@ import (
registor "github.com/odysseus/service-registry/registry"
"net/http"
"strconv"
"strings"
"time"
)
......@@ -289,7 +290,7 @@ func (server *ExplorerController) Tasks() {
ProfitAcc: task.ProfitAcc,
WorkerAcc: task.WorkerAcc,
}
if taskId == 998 {
if strings.Compare(reTask.Type, "unknown") == 0 {
reTask.Type = "base task"
}
responseTasks = append(responseTasks, reTask)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment