Browse Source

Wire up blocked chat username controller

pull/1130/head
Gabe Kangas 4 years ago
parent
commit
1586d80a32
  1. 2
      core/data/config.go
  2. 3
      router/router.go

2
core/data/config.go

@ -585,5 +585,5 @@ func GetUsernameBlocklist() string { @@ -585,5 +585,5 @@ func GetUsernameBlocklist() string {
// SetUsernameBlocklist set the username blocklist as a comma seperated string.
func SetUsernameBlocklist(usernames string) error {
return _datastore.SetString(serverMetadataTagsKey, usernames)
return _datastore.SetString(blockedUsernamesKey, usernames)
}

3
router/router.go

@ -119,6 +119,9 @@ func Start() error { @@ -119,6 +119,9 @@ func Start() error {
// Disable chat
http.HandleFunc("/api/admin/config/chat/disable", middleware.RequireAdminAuth(admin.SetChatDisabled))
// Set chat usernames that are not allowed
http.HandleFunc("/api/admin/config/chat/disallowedusernames", middleware.RequireAdminAuth(admin.SetUsernameBlocklist))
// Set video codec
http.HandleFunc("/api/admin/config/video/codec", middleware.RequireAdminAuth(admin.SetVideoCodec))

Loading…
Cancel
Save