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
39f124a0
Commit
39f124a0
authored
Mar 30, 2020
by
szh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update test
parent
5b550f00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
pai.go
routers/api/v1/pai.go
+15
-0
router.go
routers/router.go
+1
-0
No files found.
routers/api/v1/pai.go
View file @
39f124a0
...
@@ -13,6 +13,7 @@ import (
...
@@ -13,6 +13,7 @@ import (
"log"
"log"
"net/http"
"net/http"
"time"
"time"
"io/ioutil"
)
)
func
GetDevdetail
(
c
*
gin
.
Context
)
{
func
GetDevdetail
(
c
*
gin
.
Context
)
{
...
@@ -231,4 +232,17 @@ func GetUploadTest(c *gin.Context){
...
@@ -231,4 +232,17 @@ func GetUploadTest(c *gin.Context){
logging
.
Info
(
"uploadtest"
,
"report"
,
KP
)
logging
.
Info
(
"uploadtest"
,
"report"
,
KP
)
appG
.
Response
(
http
.
StatusOK
,
e
.
SUCCESS
,
nil
)
appG
.
Response
(
http
.
StatusOK
,
e
.
SUCCESS
,
nil
)
}
func
GetTest
(
c
*
gin
.
Context
){
appG
:=
app
.
Gin
{
C
:
c
}
body
,
err
:=
ioutil
.
ReadAll
(
appG
.
C
.
Request
.
Body
)
if
err
!=
nil
{
appG
.
Response
(
http
.
StatusOK
,
e
.
INVALID_PARAMS
,
err
)
return
}
logging
.
Info
(
"test"
,
"report"
,
string
(
body
))
appG
.
Response
(
http
.
StatusOK
,
e
.
SUCCESS
,
nil
)
}
}
\ No newline at end of file
routers/router.go
View file @
39f124a0
...
@@ -37,6 +37,7 @@ func InitRouter() *gin.Engine {
...
@@ -37,6 +37,7 @@ func InitRouter() *gin.Engine {
apiv1
.
POST
(
"/getfeedlist"
,
v1
.
GetFeedList
)
apiv1
.
POST
(
"/getfeedlist"
,
v1
.
GetFeedList
)
apiv1
.
POST
(
"/uploadinfo"
,
v1
.
GetUploadInfo
)
apiv1
.
POST
(
"/uploadinfo"
,
v1
.
GetUploadInfo
)
apiv1
.
POST
(
"/uploadtest"
,
v1
.
GetUploadTest
)
apiv1
.
POST
(
"/uploadtest"
,
v1
.
GetUploadTest
)
apiv1
.
POST
(
"/test"
,
v1
.
GetTest
)
return
r
return
r
}
}
...
...
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