mirror of
https://github.com/owncast/owncast.git
synced 2025-11-01 10:55:57 +08:00
API for setting a list of blocked usernames. For #782
This commit is contained in:
@ -56,10 +56,11 @@ func GetServerConfig(w http.ResponseWriter, r *http.Request) {
|
||||
Enabled: data.GetDirectoryEnabled(),
|
||||
InstanceURL: data.GetServerURL(),
|
||||
},
|
||||
S3: data.GetS3Config(),
|
||||
ExternalActions: data.GetExternalActions(),
|
||||
SupportedCodecs: transcoder.GetCodecs(ffmpeg),
|
||||
VideoCodec: data.GetVideoCodec(),
|
||||
S3: data.GetS3Config(),
|
||||
ExternalActions: data.GetExternalActions(),
|
||||
SupportedCodecs: transcoder.GetCodecs(ffmpeg),
|
||||
VideoCodec: data.GetVideoCodec(),
|
||||
UsernameBlocklist: data.GetUsernameBlocklist(),
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@ -70,19 +71,20 @@ func GetServerConfig(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
type serverConfigAdminResponse struct {
|
||||
InstanceDetails webConfigResponse `json:"instanceDetails"`
|
||||
FFmpegPath string `json:"ffmpegPath"`
|
||||
StreamKey string `json:"streamKey"`
|
||||
WebServerPort int `json:"webServerPort"`
|
||||
RTMPServerPort int `json:"rtmpServerPort"`
|
||||
S3 models.S3 `json:"s3"`
|
||||
VideoSettings videoSettings `json:"videoSettings"`
|
||||
LatencyLevel int `json:"latencyLevel"`
|
||||
YP yp `json:"yp"`
|
||||
ChatDisabled bool `json:"chatDisabled"`
|
||||
ExternalActions []models.ExternalAction `json:"externalActions"`
|
||||
SupportedCodecs []string `json:"supportedCodecs"`
|
||||
VideoCodec string `json:"videoCodec"`
|
||||
InstanceDetails webConfigResponse `json:"instanceDetails"`
|
||||
FFmpegPath string `json:"ffmpegPath"`
|
||||
StreamKey string `json:"streamKey"`
|
||||
WebServerPort int `json:"webServerPort"`
|
||||
RTMPServerPort int `json:"rtmpServerPort"`
|
||||
S3 models.S3 `json:"s3"`
|
||||
VideoSettings videoSettings `json:"videoSettings"`
|
||||
LatencyLevel int `json:"latencyLevel"`
|
||||
YP yp `json:"yp"`
|
||||
ChatDisabled bool `json:"chatDisabled"`
|
||||
ExternalActions []models.ExternalAction `json:"externalActions"`
|
||||
SupportedCodecs []string `json:"supportedCodecs"`
|
||||
VideoCodec string `json:"videoCodec"`
|
||||
UsernameBlocklist string `json:"usernameBlocklist"`
|
||||
}
|
||||
|
||||
type videoSettings struct {
|
||||
|
||||
Reference in New Issue
Block a user