Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
admin-backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
admin-backend
Commits
8ee233d0
Commit
8ee233d0
authored
May 23, 2024
by
brent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify client api
parent
fcb32eb6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
client.go
controllers/client.go
+4
-3
explorer.go
controllers/explorer.go
+2
-1
No files found.
controllers/client.go
View file @
8ee233d0
...
...
@@ -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
()
item
.
BaseModel
=
task
.
BaseModel
}
if
task
.
Id
==
998
{
if
strings
.
Compare
(
item
.
Type
,
"unknown"
)
==
0
{
item
.
Type
=
"base task"
}
item
.
BaseModel
=
task
.
BaseModel
}
}
workload
:=
big
.
NewInt
(
item
.
Workload
)
weiPerWorkload
,
_
:=
strconv
.
Atoi
(
value
.
Wei
)
...
...
controllers/explorer.go
View file @
8ee233d0
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment