github.com/masterhung0112/hk_server/v5@v5.0.0-20220302090640-ec71aef15e1c/api4/bot_local.go (about)

     1  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
     2  // See LICENSE.txt for license information.
     3  
     4  package api4
     5  
     6  func (api *API) InitBotLocal() {
     7  	api.BaseRoutes.Bot.Handle("", api.ApiLocal(getBot)).Methods("GET")
     8  	api.BaseRoutes.Bot.Handle("", api.ApiLocal(patchBot)).Methods("PUT")
     9  	api.BaseRoutes.Bot.Handle("/disable", api.ApiLocal(disableBot)).Methods("POST")
    10  	api.BaseRoutes.Bot.Handle("/enable", api.ApiLocal(enableBot)).Methods("POST")
    11  	api.BaseRoutes.Bot.Handle("/convert_to_user", api.ApiLocal(convertBotToUser)).Methods("POST")
    12  	api.BaseRoutes.Bot.Handle("/assign/{user_id:[A-Za-z0-9]+}", api.ApiLocal(assignBot)).Methods("POST")
    13  
    14  	api.BaseRoutes.Bots.Handle("", api.ApiLocal(getBots)).Methods("GET")
    15  }