|
@@ -28,10 +28,15 @@ func Config(c *gin.Context) {
|
|
|
if len(healthNodes()) > 0 {
|
|
|
node = healthNodes()[0]
|
|
|
}
|
|
|
+ freeTrialDuration := uint64(0)
|
|
|
+ if usedDuration <= totalFreeDuration {
|
|
|
+ freeTrialDuration = totalFreeDuration - usedDuration
|
|
|
+ }
|
|
|
+
|
|
|
c.JSON(http.StatusOK, dto.ConfigResponse{
|
|
|
Response: dto.NewOkResponse(),
|
|
|
Data: dto.ConfigResult{
|
|
|
- FreeTrialDuration: totalFreeDuration - usedDuration,
|
|
|
+ FreeTrialDuration: freeTrialDuration,
|
|
|
Timestamp: time.Now().Unix(),
|
|
|
Node: convert2DtoNode(node),
|
|
|
},
|