mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed #15946 - added comtent type to webhook test
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
57f80290a1
commit
221ffb446c
|
@ -159,7 +159,7 @@ class SlackSettingsForm extends Component
|
||||||
]);
|
]);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$test = $webhook->post($this->webhook_endpoint, ['body' => $payload]);
|
$test = $webhook->post($this->webhook_endpoint, ['body' => $payload, ['headers' => ['Content-Type' => 'application/json']]]);
|
||||||
|
|
||||||
if(($test->getStatusCode() == 302)||($test->getStatusCode() == 301)){
|
if(($test->getStatusCode() == 302)||($test->getStatusCode() == 301)){
|
||||||
return session()->flash('error' , trans('admin/settings/message.webhook.error_redirect', ['endpoint' => $this->webhook_endpoint]));
|
return session()->flash('error' , trans('admin/settings/message.webhook.error_redirect', ['endpoint' => $this->webhook_endpoint]));
|
||||||
|
|
Loading…
Reference in a new issue