From e931e322cbfd2cfed5909dc6f98ebef3f3a4abef Mon Sep 17 00:00:00 2001 From: Clivern Date: Sat, 2 Jan 2021 00:05:26 +0100 Subject: [PATCH] stable release --- Dockerfile | 2 +- README.md | 4 ++-- core/controller/service.go | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b0b66cd9..aee470b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM golang:1.16.5 -ARG PEANUT_VERSION=0.1.11 +ARG PEANUT_VERSION=0.1.12 ENV GO111MODULE=on diff --git a/README.md b/README.md index 1790be1c..00f3327c 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ - + - + diff --git a/core/controller/service.go b/core/controller/service.go index b6a70bbc..ad020ec3 100644 --- a/core/controller/service.go +++ b/core/controller/service.go @@ -15,6 +15,7 @@ import ( "github.com/gin-gonic/gin" log "github.com/sirupsen/logrus" + "github.com/spf13/viper" ) // ServicePayload type @@ -23,6 +24,7 @@ type ServicePayload struct { Service string `json:"service"` Configs map[string]string `json:"configs"` DeleteAfter string `json:"deleteAfter"` + Address string `json:"address"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` } @@ -73,6 +75,7 @@ func GetServices(c *gin.Context) { Service: v.Service, Configs: v.Configs, DeleteAfter: v.DeleteAfter, + Address: viper.GetString("app.hostname"), CreatedAt: time.Unix(v.CreatedAt, 0), UpdatedAt: time.Unix(v.UpdatedAt, 0), }) @@ -136,6 +139,7 @@ func GetService(c *gin.Context) { "service": serviceData.Service, "configs": serviceData.Configs, "deleteAfter": serviceData.DeleteAfter, + "address": viper.GetString("app.hostname"), "createdAt": time.Unix(serviceData.CreatedAt, 0), "updatedAt": time.Unix(serviceData.UpdatedAt, 0), })