diff --git a/config/config.go b/config/config.go index ff47553..25c8c0b 100755 --- a/config/config.go +++ b/config/config.go @@ -42,9 +42,6 @@ type Config struct { AppName string BaseUrl string - Project string - ProjectDocumentation string - ProjectDownload string ProjectExampleVideo string JwtSecretKey string @@ -138,9 +135,8 @@ type Config struct { } type PublicConfig struct { - AppName string - BaseUrl string - Project string + AppName string + BaseUrl string EncodingEnabled bool UploadEnabled bool @@ -168,7 +164,6 @@ func (c Config) PublicConfig() PublicConfig { return PublicConfig{ AppName: c.AppName, BaseUrl: c.BaseUrl, - Project: c.Project, EncodingEnabled: *c.EncodingEnabled, UploadEnabled: *c.UploadEnabled, diff --git a/configdb/configdb.go b/configdb/configdb.go index 5a406cb..3a14463 100644 --- a/configdb/configdb.go +++ b/configdb/configdb.go @@ -21,9 +21,6 @@ func Setup() { config.ENV.AppName = getEnvDb(&setting.AppName, "VideoCMS") config.ENV.BaseUrl = getEnvDb(&setting.BaseUrl, "http://127.0.0.1:3000") - config.ENV.Project = getEnvDb(&setting.Project, "https://github.com/notfound") - config.ENV.ProjectDocumentation = getEnvDb(&setting.ProjectDocumentation, "https://github.com/notfound") - config.ENV.ProjectDownload = getEnvDb(&setting.ProjectDownload, "https://github.com/notfound") config.ENV.ProjectExampleVideo = getEnvDb(&setting.ProjectExampleVideo, "notfound") config.ENV.JwtSecretKey = getEnvDb(&setting.JwtSecretKey, randomstring.CookieFriendlyString(64)) diff --git a/controllers/PlayerController.go b/controllers/PlayerController.go index e700cfb..12a95fa 100755 --- a/controllers/PlayerController.go +++ b/controllers/PlayerController.go @@ -179,7 +179,6 @@ func PlayerController(c echo.Context) error { "Webhooks": string(rawWebhooks), "StreamIsReady": streamIsReady, "UUID": requestValidation.UUID, - "PROJECTURL": config.ENV.Project, "Folder": config.ENV.FolderVideoQualitysPub, "JWT": tkn, "AppName": config.ENV.AppName, diff --git a/controllers/UpdateSettingsController.go b/controllers/UpdateSettingsController.go index b433531..c873522 100755 --- a/controllers/UpdateSettingsController.go +++ b/controllers/UpdateSettingsController.go @@ -27,9 +27,6 @@ func UpdateSettings(c echo.Context) error { setting.ID = validation.ID setting.AppName = validation.AppName setting.BaseUrl = validation.BaseUrl - setting.Project = validation.Project - setting.ProjectDocumentation = validation.ProjectDocumentation - setting.ProjectDownload = validation.ProjectDownload setting.ProjectExampleVideo = validation.ProjectExampleVideo setting.JwtSecretKey = validation.JwtSecretKey setting.JwtUploadSecretKey = validation.JwtUploadSecretKey diff --git a/controllers/ViewIndexController.go b/controllers/ViewIndexController.go index 486056e..29bc76e 100755 --- a/controllers/ViewIndexController.go +++ b/controllers/ViewIndexController.go @@ -14,16 +14,12 @@ func ViewIndex(c echo.Context) error { var link models.Link if res := inits.DB.First(&link); res.Error != nil { return c.Render(http.StatusOK, "index.html", echo.Map{ - "ExampleVideo": fmt.Sprintf("/%v", "notfound"), - "AppName": config.ENV.AppName, - "ProjectDocumentation": config.ENV.ProjectDocumentation, - "ProjectDownload": config.ENV.ProjectDownload, + "ExampleVideo": fmt.Sprintf("/%v", "notfound"), + "AppName": config.ENV.AppName, }) } return c.Render(http.StatusOK, "index.html", echo.Map{ - "ExampleVideo": fmt.Sprintf("/%v", link.UUID), - "AppName": config.ENV.AppName, - "ProjectDocumentation": config.ENV.ProjectDocumentation, - "ProjectDownload": config.ENV.ProjectDownload, + "ExampleVideo": fmt.Sprintf("/%v", link.UUID), + "AppName": config.ENV.AppName, }) } diff --git a/models/Setting.go b/models/Setting.go index ab4fa4c..71cd026 100644 --- a/models/Setting.go +++ b/models/Setting.go @@ -7,13 +7,10 @@ type SettingValidation struct { type Setting struct { Model - AppName string `validate:"required,min=1,max=120" gorm:"size:120;"` - BaseUrl string `validate:"required,min=1,max=255" gorm:"size:255;"` + AppName string `validate:"required,min=1,max=120" gorm:"size:120;"` + BaseUrl string `validate:"required,min=1,max=120" gorm:"size:120;"` - Project string `validate:"required,min=1,max=512" gorm:"size:512;"` - ProjectDocumentation string `validate:"required,min=1,max=512" gorm:"size:512;"` - ProjectDownload string `validate:"required,min=1,max=512" gorm:"size:512;"` - ProjectExampleVideo string `validate:"required,min=1,max=512" gorm:"size:512;"` + ProjectExampleVideo string `validate:"required,min=1,max=512" gorm:"size:512;"` JwtSecretKey string `validate:"required,min=8,max=512" gorm:"size:512;"` JwtUploadSecretKey string `validate:"required,min=8,max=512" gorm:"size:512;"` diff --git a/views/index.html b/views/index.html index d958b5f..aff12c9 100755 --- a/views/index.html +++ b/views/index.html @@ -14,10 +14,10 @@