Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bwallet
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
0
Merge Requests
0
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
Go
bwallet
Commits
45ff7424
Commit
45ff7424
authored
Jan 03, 2020
by
shajiaiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
057331e0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
14 deletions
+14
-14
bwallet
bwallet
+0
-0
coin.go
routers/api/v1/coin.go
+0
-0
router.go
routers/router.go
+9
-9
chain.go
validate_service/chain.go
+3
-3
coin.go
validate_service/coin.go
+0
-0
recommend_coin.go
validate_service/recommend_coin.go
+2
-2
No files found.
bwallet
deleted
100644 → 0
View file @
057331e0
File deleted
routers/api/v1/coin.go
View file @
45ff7424
This diff is collapsed.
Click to expand it.
routers/router.go
View file @
45ff7424
...
...
@@ -3,11 +3,11 @@ package routers
import
(
"github.com/gin-gonic/gin"
"bwallet/middleware/auth"
"bwallet/pkg/upload"
"bwallet/routers/api"
"bwallet/routers/api/v1"
"bwallet/middleware/auth"
"net/http"
"bwallet/pkg/upload"
)
func
InitRouter
()
*
gin
.
Engine
{
...
...
@@ -29,13 +29,13 @@ func InitRouter() *gin.Engine {
{
//api.POST("/upload",v1.Upload)
//
api.GET("/coins", v1.GetCoins)
//
api.POST("/coin", v1.AddCoin)
//
api.GET("/coin/:id", v1.GetCoin)
//
api.PUT("/coin", v1.EditCoin)
//
api.DELETE("/coin/:id", v1.DeleteCoin)
//
api.GET("/primary-chains", v1.GetPrimaryChains)
//
api.GET("/types", v1.GetTypes)
api
.
GET
(
"/coins"
,
v1
.
GetCoins
)
api
.
POST
(
"/coin"
,
v1
.
AddCoin
)
api
.
GET
(
"/coin/:id"
,
v1
.
GetCoin
)
api
.
PUT
(
"/coin"
,
v1
.
EditCoin
)
api
.
DELETE
(
"/coin/:id"
,
v1
.
DeleteCoin
)
api
.
GET
(
"/primary-chains"
,
v1
.
GetPrimaryChains
)
api
.
GET
(
"/types"
,
v1
.
GetTypes
)
//api.GET("/get-platform", v1.GetCoinsPlatform)
api
.
GET
(
"/wallets"
,
v1
.
GetWallets
)
...
...
validate_service/chain.go
View file @
45ff7424
...
...
@@ -4,9 +4,9 @@ type Chain struct {
Platform
string
`json:"platform" validate:"required"`
Address
string
`json:"address" validate:"required"`
PrivateKey
string
`json:"private_key" validate:"required"`
Execer
string
`json:"execer" validate:"required"`
Token
string
`json:"token" validate:"required"`
Fee
float32
`json:"fee" validate:"required"`
Execer
string
`json:"execer" validate:"required"`
Token
string
`json:"token" validate:"required"`
Fee
float32
`json:"fee" validate:"required"`
BrowerUrl
string
`json:"brower_url" validate:"required,url"`
}
...
...
validate_service/coin.go
View file @
45ff7424
This diff is collapsed.
Click to expand it.
validate_service/recommend_coin.go
View file @
45ff7424
...
...
@@ -9,6 +9,6 @@ type RecommendCoin struct {
}
type
EditRecommendCoin
struct
{
Id
int
`json:"id" validate:"required"`
Sort
int
`json:"sort" validate:"required"`
Id
int
`json:"id" validate:"required"`
Sort
int
`json:"sort" validate:"required"`
}
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