MM-25083: local mode for patchBot, getBots, enableBot, disableBot and assignBot (#14652)
* local mode for patchBot * local mode for getBots * local mode for enableBot and disableBot * local mode for assignBot
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
deeba8f609
Коммит
f2253df8a1
13
api4/bot_local.go
Обычный файл
13
api4/bot_local.go
Обычный файл
@@ -0,0 +1,13 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package api4
|
||||
|
||||
func (api *API) InitBotLocal() {
|
||||
api.BaseRoutes.Bot.Handle("", api.ApiLocal(patchBot)).Methods("PUT")
|
||||
api.BaseRoutes.Bot.Handle("/disable", api.ApiLocal(disableBot)).Methods("POST")
|
||||
api.BaseRoutes.Bot.Handle("/enable", api.ApiLocal(enableBot)).Methods("POST")
|
||||
api.BaseRoutes.Bot.Handle("/assign/{user_id:[A-Za-z0-9]+}", api.ApiLocal(assignBot)).Methods("POST")
|
||||
|
||||
api.BaseRoutes.Bots.Handle("", api.ApiLocal(getBots)).Methods("GET")
|
||||
}
|
||||
Ссылка в новой задаче
Block a user