0

Wire up blocked chat username controller

This commit is contained in:
Gabe Kangas 2021-06-21 20:16:21 -07:00
parent 99d04c8e69
commit 1586d80a32
2 changed files with 4 additions and 1 deletions

View File

@ -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)
}

View File

@ -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))