|
@@ -13,6 +13,15 @@ import (
|
|
|
var nodes = make([]*model.Node, 0)
|
|
|
var locker = sync.RWMutex{}
|
|
|
|
|
|
+func Config(c *gin.Context) {
|
|
|
+ c.JSON(http.StatusOK, dto.ConfigResponse{
|
|
|
+ Response: dto.NewOkResponse(),
|
|
|
+ Data: dto.ConfigResult{
|
|
|
+ FreeTrialDuration: (time.Hour * 1).Milliseconds() / 1000,
|
|
|
+ },
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
func Register(c *gin.Context) {
|
|
|
locker.Lock()
|
|
|
defer locker.Unlock()
|
|
@@ -63,10 +72,7 @@ func List(c *gin.Context) {
|
|
|
|
|
|
c.JSON(http.StatusOK, dto.ListResponse{
|
|
|
Response: dto.NewOkResponse(),
|
|
|
- Data: dto.ListResult{
|
|
|
- Nodes: dtoNodes,
|
|
|
- FreeTrialDuration: (time.Hour * 1).Milliseconds() / 1000,
|
|
|
- },
|
|
|
+ Data: dtoNodes,
|
|
|
})
|
|
|
}
|
|
|
|