@@ -77,16 +77,15 @@ public function update(FormDataRequest $request)
77
77
$ message = '<p><strong>IP:</strong> ' .$ request ->ip ().'<br/><strong>Browser:</strong> ' .$ request ->header ('User-Agent ' ).'</p> ' ;
78
78
79
79
$ ticket_data = json_encode ((object ) [
80
- 'message ' => '<h3>Aanvraag ' .env ('APP_NAME ' , 'SiteBoss support form ' ).'</h3><p> ' .nl2br (htmlentities ($ request ->input ('description ' ))).'</p><hr/> ' .$ message ,
80
+ 'body ' => '<h3>Aanvraag ' .env ('APP_NAME ' , 'SiteBoss support form ' ).'</h3><p> ' .nl2br (htmlentities ($ request ->input ('description ' ))).'</p><hr/> ' .$ message ,
81
81
'email ' => $ request ->input ('email ' ),
82
- 'priority ' => 2 ,
83
82
'subject ' => $ request ->input ('subject ' ),
83
+ 'api_key ' => config ('support.api_key ' )
84
84
]);
85
85
$ url = config ('support.endpoint ' );
86
86
$ ch = curl_init ($ url );
87
87
88
88
$ header [] = 'Content-type: application/json ' ;
89
- $ header [] = 'Bearer: ' .config ('support.api_key ' );
90
89
curl_setopt ($ ch , CURLOPT_POST , true );
91
90
curl_setopt ($ ch , CURLOPT_HTTPHEADER , $ header );
92
91
curl_setopt ($ ch , CURLOPT_HEADER , false );
@@ -98,7 +97,7 @@ public function update(FormDataRequest $request)
98
97
$ info = curl_getinfo ($ ch );
99
98
100
99
$ response = new LayoutResponse ();
101
- if ($ info ['http_code ' ] == 200 && $ server_output -> result == ' ok ' ) {
100
+ if ($ info ['http_code ' ] == 200 ) {
102
101
$ toast = new Toast (__ ('siteboss::support.done ' ));
103
102
$ response ->addAction ($ toast );
104
103
} else {
0 commit comments