MM-56819: Introduce --local mode in MMCTL to handle user preferences. (#26972)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
388dfdfbca
Коммит
0c3c298253
12
server/channels/api4/preference_local.go
Обычный файл
12
server/channels/api4/preference_local.go
Обычный файл
@@ -0,0 +1,12 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package api4
|
||||
|
||||
func (api *API) InitPreferenceLocal() {
|
||||
api.BaseRoutes.Preferences.Handle("", api.APILocal(getPreferences)).Methods("GET")
|
||||
api.BaseRoutes.Preferences.Handle("", api.APILocal(updatePreferences)).Methods("PUT")
|
||||
api.BaseRoutes.Preferences.Handle("/delete", api.APILocal(deletePreferences)).Methods("POST")
|
||||
api.BaseRoutes.Preferences.Handle("/{category:[A-Za-z0-9_]+}", api.APILocal(getPreferencesByCategory)).Methods("GET")
|
||||
api.BaseRoutes.Preferences.Handle("/{category:[A-Za-z0-9_]+}/name/{preference_name:[A-Za-z0-9_]+}", api.APILocal(getPreferenceByCategoryAndName)).Methods("GET")
|
||||
}
|
||||
Ссылка в новой задаче
Block a user