Skip to content

Commit 971097e

Browse files
committed
feat(config): remove Project Name, Documentation and Download URLs (Hardcoded links)
1 parent 0cbe1dc commit 971097e

File tree

10 files changed

+14
-33
lines changed

10 files changed

+14
-33
lines changed

config/config.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ type Config struct {
4242
AppName string
4343
BaseUrl string
4444

45-
Project string
46-
ProjectDocumentation string
47-
ProjectDownload string
4845
ProjectExampleVideo string
4946

5047
JwtSecretKey string
@@ -138,9 +135,8 @@ type Config struct {
138135
}
139136

140137
type PublicConfig struct {
141-
AppName string
142-
BaseUrl string
143-
Project string
138+
AppName string
139+
BaseUrl string
144140
EncodingEnabled bool
145141
UploadEnabled bool
146142

@@ -168,7 +164,6 @@ func (c Config) PublicConfig() PublicConfig {
168164
return PublicConfig{
169165
AppName: c.AppName,
170166
BaseUrl: c.BaseUrl,
171-
Project: c.Project,
172167
EncodingEnabled: *c.EncodingEnabled,
173168
UploadEnabled: *c.UploadEnabled,
174169

configdb/configdb.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ func Setup() {
2121
config.ENV.AppName = getEnvDb(&setting.AppName, "VideoCMS")
2222
config.ENV.BaseUrl = getEnvDb(&setting.BaseUrl, "http://127.0.0.1:3000")
2323

24-
config.ENV.Project = getEnvDb(&setting.Project, "https://github.com/notfound")
25-
config.ENV.ProjectDocumentation = getEnvDb(&setting.ProjectDocumentation, "https://github.com/notfound")
26-
config.ENV.ProjectDownload = getEnvDb(&setting.ProjectDownload, "https://github.com/notfound")
2724
config.ENV.ProjectExampleVideo = getEnvDb(&setting.ProjectExampleVideo, "notfound")
2825

2926
config.ENV.JwtSecretKey = getEnvDb(&setting.JwtSecretKey, randomstring.CookieFriendlyString(64))

controllers/PlayerController.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ func PlayerController(c echo.Context) error {
179179
"Webhooks": string(rawWebhooks),
180180
"StreamIsReady": streamIsReady,
181181
"UUID": requestValidation.UUID,
182-
"PROJECTURL": config.ENV.Project,
183182
"Folder": config.ENV.FolderVideoQualitysPub,
184183
"JWT": tkn,
185184
"AppName": config.ENV.AppName,

controllers/UpdateSettingsController.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ func UpdateSettings(c echo.Context) error {
2727
setting.ID = validation.ID
2828
setting.AppName = validation.AppName
2929
setting.BaseUrl = validation.BaseUrl
30-
setting.Project = validation.Project
31-
setting.ProjectDocumentation = validation.ProjectDocumentation
32-
setting.ProjectDownload = validation.ProjectDownload
3330
setting.ProjectExampleVideo = validation.ProjectExampleVideo
3431
setting.JwtSecretKey = validation.JwtSecretKey
3532
setting.JwtUploadSecretKey = validation.JwtUploadSecretKey

controllers/ViewIndexController.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,12 @@ func ViewIndex(c echo.Context) error {
1414
var link models.Link
1515
if res := inits.DB.First(&link); res.Error != nil {
1616
return c.Render(http.StatusOK, "index.html", echo.Map{
17-
"ExampleVideo": fmt.Sprintf("/%v", "notfound"),
18-
"AppName": config.ENV.AppName,
19-
"ProjectDocumentation": config.ENV.ProjectDocumentation,
20-
"ProjectDownload": config.ENV.ProjectDownload,
17+
"ExampleVideo": fmt.Sprintf("/%v", "notfound"),
18+
"AppName": config.ENV.AppName,
2119
})
2220
}
2321
return c.Render(http.StatusOK, "index.html", echo.Map{
24-
"ExampleVideo": fmt.Sprintf("/%v", link.UUID),
25-
"AppName": config.ENV.AppName,
26-
"ProjectDocumentation": config.ENV.ProjectDocumentation,
27-
"ProjectDownload": config.ENV.ProjectDownload,
22+
"ExampleVideo": fmt.Sprintf("/%v", link.UUID),
23+
"AppName": config.ENV.AppName,
2824
})
2925
}

models/Setting.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ type SettingValidation struct {
77

88
type Setting struct {
99
Model
10-
AppName string `validate:"required,min=1,max=120" gorm:"size:120;"`
11-
BaseUrl string `validate:"required,min=1,max=255" gorm:"size:255;"`
10+
AppName string `validate:"required,min=1,max=120" gorm:"size:120;"`
11+
BaseUrl string `validate:"required,min=1,max=120" gorm:"size:120;"`
1212

13-
Project string `validate:"required,min=1,max=512" gorm:"size:512;"`
14-
ProjectDocumentation string `validate:"required,min=1,max=512" gorm:"size:512;"`
15-
ProjectDownload string `validate:"required,min=1,max=512" gorm:"size:512;"`
16-
ProjectExampleVideo string `validate:"required,min=1,max=512" gorm:"size:512;"`
13+
ProjectExampleVideo string `validate:"required,min=1,max=512" gorm:"size:512;"`
1714

1815
JwtSecretKey string `validate:"required,min=8,max=512" gorm:"size:512;"`
1916
JwtUploadSecretKey string `validate:"required,min=8,max=512" gorm:"size:512;"`

videocms-docs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit d83cf5490b64cd25878d093a7e0585d461fe6b77
1+
Subproject commit af647720e1f1425fe0210832a6b7c7b72095734d

videocms-frontend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 60a5a024bf2cafff5f541b0b5e107b7cf651bc44
1+
Subproject commit 4cc09d9296c2c157c51deb7399641a7a3459eb3f

views/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ <h1>{{.AppName}}</h1>
1414
<a target="_blank" href="{{.ExampleVideo}}">Example Video Player</a>
1515
</li>
1616
<li>
17-
<a target="_blank" href="{{.ProjectDocumentation}}">Api Documentation</a>
17+
<a target="_blank" href="https://videocms-docs.vercel.app/">Api Documentation</a>
1818
</li>
1919
<li>
20-
<a target="_blank" href="{{.ProjectDownload}}">Docker Image / Download</a>
20+
<a target="_blank" href="https://hub.docker.com/r/kirari04/videocms">Docker Image / Download</a>
2121
</li>
2222
<li>
2323
<a target="_blank" href="examples/upload">Upload Example</a>

views/player.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@
431431
if (Webhooks == null) Webhooks = [];
432432
const JWT = "{{.JWT}}";
433433
const UUID = "{{.UUID}}";
434-
const PROJECTURL = "{{.PROJECTURL}}";
434+
435435
const TITLE = "{{.Title}}";
436436
const StreamIsReady = ("{{.StreamIsReady}}" === "true");
437437
const FOLDER = "{{.Folder}}";

0 commit comments

Comments
 (0)