diff --git a/src/client/client.go b/src/client/client.go index 7bdaa97..5e0c688 100644 --- a/src/client/client.go +++ b/src/client/client.go @@ -862,7 +862,7 @@ func (s *SignalClient) UpdateProfile(number string, profileName string, base64Av return err } - avatarTmpPath := s.avatarTmpDir + u.String() + "." + fType.Extension + avatarTmpPath = s.avatarTmpDir + u.String() + "." + fType.Extension f, err := os.Create(avatarTmpPath) if err != nil { diff --git a/src/main.go b/src/main.go index 45d1a81..ff02bd8 100644 --- a/src/main.go +++ b/src/main.go @@ -12,7 +12,7 @@ import ( "github.com/bbernhard/signal-cli-rest-api/api" "github.com/bbernhard/signal-cli-rest-api/client" - _ "github.com/bbernhard/signal-cli-rest-api/docs" + docs "github.com/bbernhard/signal-cli-rest-api/docs" "github.com/bbernhard/signal-cli-rest-api/utils" "github.com/gin-gonic/gin" "github.com/robfig/cron/v3" @@ -60,6 +60,8 @@ func main() { avatarTmpDir := flag.String("avatar-tmp-dir", "/tmp/", "Avatar tmp directory") flag.Parse() + docs.SwaggerInfo.Schemes = []string{"http", "https"} + router := gin.New() router.Use(gin.LoggerWithConfig(gin.LoggerConfig{ SkipPaths: []string{"/v1/health"}, //do not log the health requests (to avoid spamming the log file)