Use request.CTX instead of *request.Context (#24877)
* Use request.CTX instead of *request.Context * Fix tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
37dc35c1a1
Коммит
c7461751f2
@@ -657,7 +657,7 @@ func (a *App) RegenOutgoingWebhookToken(hook *model.OutgoingWebhook) (*model.Out
|
||||
return webhook, nil
|
||||
}
|
||||
|
||||
func (a *App) HandleIncomingWebhook(c *request.Context, hookID string, req *model.IncomingWebhookRequest) *model.AppError {
|
||||
func (a *App) HandleIncomingWebhook(c request.CTX, hookID string, req *model.IncomingWebhookRequest) *model.AppError {
|
||||
if !*a.Config().ServiceSettings.EnableIncomingWebhooks {
|
||||
return model.NewAppError("HandleIncomingWebhook", "web.incoming_webhook.disabled.app_error", nil, "", http.StatusNotImplemented)
|
||||
}
|
||||
@@ -817,7 +817,7 @@ func (a *App) CreateCommandWebhook(commandID string, args *model.CommandArgs) (*
|
||||
return savedHook, nil
|
||||
}
|
||||
|
||||
func (a *App) HandleCommandWebhook(c *request.Context, hookID string, response *model.CommandResponse) *model.AppError {
|
||||
func (a *App) HandleCommandWebhook(c request.CTX, hookID string, response *model.CommandResponse) *model.AppError {
|
||||
if response == nil {
|
||||
return model.NewAppError("HandleCommandWebhook", "app.command_webhook.handle_command_webhook.parse", nil, "", http.StatusBadRequest)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user