Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
chain33-pai
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
szh
chain33-pai
Commits
bf29a82c
Commit
bf29a82c
authored
Mar 31, 2020
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
parent
21291c02
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
pai.go
routers/api/v1/pai.go
+4
-5
No files found.
routers/api/v1/pai.go
View file @
bf29a82c
...
...
@@ -4,7 +4,6 @@ import (
"chain33-pai/models"
"chain33-pai/pkg/app"
"chain33-pai/pkg/e"
"chain33-pai/pkg/logging"
"chain33-pai/service/pai_service"
"chain33-pai/service/stat_service"
"chain33-pai/service/version_service"
...
...
@@ -49,7 +48,7 @@ func GetTicketInfo(c *gin.Context) {
appG
.
Response
(
http
.
StatusOK
,
e
.
INVALID_PARAMS
,
nil
)
return
}
logging
.
Info
(
"req:"
,
req
)
fmt
.
Println
(
"req:"
,
req
)
if
req
.
Detail
{
if
req
.
Page
==
0
{
req
.
Page
=
int32
(
1
)
...
...
@@ -61,7 +60,7 @@ func GetTicketInfo(c *gin.Context) {
var
pai
pai_service
.
Pai
info
,
err
:=
pai
.
GetTicketInfo
(
&
req
)
if
err
!=
nil
{
logging
.
Error
(
"GetTicketInfo err"
,
err
)
fmt
.
Println
(
"GetTicketInfo err"
,
err
)
appG
.
Response
(
http
.
StatusOK
,
e
.
ERROR
,
nil
)
return
}
...
...
@@ -79,11 +78,11 @@ func RecordMineTime(c *gin.Context) {
appG
.
Response
(
http
.
StatusOK
,
e
.
INVALID_PARAMS
,
nil
)
return
}
logging
.
Info
(
"req:"
,
req
)
fmt
.
Println
(
"req:"
,
req
)
var
stat
stat_service
.
RaspMinerStat
err
=
stat
.
SetMineTime
(
req
.
Addr
,
req
.
Flag
)
if
err
!=
nil
{
logging
.
Error
(
"GetTicketInfo err"
,
err
)
fmt
.
Println
(
"GetTicketInfo err"
,
err
)
appG
.
Response
(
http
.
StatusOK
,
e
.
ERROR
,
nil
)
return
}
...
...
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