clear unnecessary code

This commit is contained in:
sulenn 2021-04-27 09:49:18 +08:00
parent c23942f1c8
commit b96ca4e737
2 changed files with 0 additions and 66 deletions

View File

@ -20,35 +20,3 @@ type ReponseRepo struct {
Repo
Response
}
// TransferTokenOption is options when to transfer amount from one person to another
type TransferTokenOption struct {
TokenSymbol string `json:"reponame" binding:"Required"` // 项目名
From string `json:"payer" binding:"Required"` // 付款人
To string `json:"payee" binding:"Required"` // 收款人
Amount uint64 `json:"amount" binding:"Required"` // 金额
}
// AddTokenOption is options when user add amount
type AddTokenOption struct {
TokenSymbol string `json:"reponame" binding:"Required"` // 项目名
Username string `json:"username" binding:"Required"` // 用户名
Amount uint64 `json:"amount" binding:"Required"` // 金额
}
// MinusTokenOption is options when user minus amount
type MinusTokenOption struct {
TokenSymbol string `json:"reponame" binding:"Required"` // 项目名
Username string `json:"username" binding:"Required"` // 用户名
Amount uint64 `json:"amount" binding:"Required"` // 金额
}
// // UserBalance represents a user's balance
// type UserBalance struct {
// Username string `json:"username" binding:"Required"` // 用户名
// TokenSymbol string `json:"reponame" binding:"Required"` // 项目名
// Balance uint64 `json:"balance"` // 用户余额
// }
// // UserBalanceList represents all user's balance list in repository
// type UserBalanceList []*UserBalance

View File

@ -27,38 +27,4 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/trustie", func() {
m.Post("/fiscobcos", bind(api.FiscoBcos{}), fiscobcos.HandleAllRoutes)
})
// m.Group("/user", func() {
// // m.Post("/register", bind(api.CreateUserOption{}), user.Register) // 注册用户
// m.Get("/query/allbalance", user.SelectUserAllBalance) // 查询用户所有项目Token
// m.Get("/query/balance", user.SelectUserBalance) // 查询用户单个项目Token
// })
// m.Group("/channel", func() {
// m.Post("/create", bind(api.CreateChannelOption{}), channel.Create) // 创建通道
// m.Post("/join", bind(api.JoinChannelOption{}), channel.Join) // Perr 节点加入通道
// m.Group("/chaincode", func() {
// m.Post("/instantiate", bind(api.InstantiateChaincodeOption{}), channel.InstantiateChaincode) // 实例化链码
// m.Post("/invoke", bind(api.InvokeChaincodeOption{}), channel.InvokeChaincode) // 调用链码
// m.Get("/query/:channelName/:chaincodeName", channel.QueryChaincode) // 查询链码,注意 channelName 不能为 channel_name无法识别导致 api 路径出错404 错误
// })
// })
// m.Group("/chaincode", func() {
// m.Post("/install", bind(api.InstallChaincodeOption{}), chaincode.Install) // 安装链码
// })
// m.Group("/repos", func() {
// m.Post("/create", bind(api.CreateRepoOption{}), repo.Create) // 在区块链账本中新建一个项目
// // m.Group("/amount", func() { // 和 token 值相关路由
// // m.Post("/transfer", bind(api.TransferTokenOption{}), repo.Transfer) // 转账
// // m.Post("/add", bind(api.AddTokenOption{}), repo.Add) // 增加账户余额
// // m.Post("/minus", bind(api.MinusTokenOption{}), repo.Minus) // 减少账户余额
// m.Get("/query/basic", repo.QueryBasic) // 查询账户余额
// // m.Get("/repo/query", repo.QueryRepoAmount) // 查询项目总金额
// // })
// // m.Group("/commit", func() {
// // m.Post("/upload", bind(api.UploadCommitOption{}), repo.Upload) // 记录 commit 数据
// // })
// })
}