Skip to content

Commit

Permalink
fix: p2p zone
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed Feb 9, 2025
1 parent 0ed60c8 commit c30b7bf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ description: A Helm chart for deploying Synctv application with PostgreSQL State

type: application

appVersion: 0.9.5
version: 0.9.5
appVersion: 0.9.6
version: 0.9.6
6 changes: 6 additions & 0 deletions internal/settings/var.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,9 @@ var HOST = NewStringSetting(
return err
}),
)

var P2PZone = NewStringSetting(
"p2p_zone",
"hk",
model.SettingGroupServer,
)
2 changes: 2 additions & 0 deletions server/handlers/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type publicSettings struct {
EmailWhitelistEnabled bool `json:"emailWhitelistEnabled"`
Oauth2DisableSignup bool `json:"oauth2DisableSignup"`
GuestEnable bool `json:"guestEnable"`
P2PZone string `json:"p2pZone"`
}

func Settings(ctx *gin.Context) {
Expand All @@ -43,6 +44,7 @@ func Settings(ctx *gin.Context) {
Oauth2DisableSignup: settings.DisableUserSignup.Get() || len(oauth2SignupEnabled) == 0,

GuestEnable: settings.EnableGuest.Get(),
P2PZone: settings.P2PZone.Get(),
},
))
}
2 changes: 1 addition & 1 deletion synctv-web

0 comments on commit c30b7bf

Please sign in to comment.