Remove logging
This commit is contained in:
parent
c6228f5541
commit
2ef6b93117
1 changed files with 1 additions and 4 deletions
|
@ -54,7 +54,6 @@ class MicropubClientController extends Controller
|
||||||
*/
|
*/
|
||||||
public function store(Request $request)
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
Log::info('posting new note');
|
|
||||||
$domain = $request->session()->get('me');
|
$domain = $request->session()->get('me');
|
||||||
$token = $request->session()->get('token');
|
$token = $request->session()->get('token');
|
||||||
|
|
||||||
|
@ -63,14 +62,12 @@ class MicropubClientController extends Controller
|
||||||
$this->indieClient
|
$this->indieClient
|
||||||
);
|
);
|
||||||
if (! $micropubEndpoint) {
|
if (! $micropubEndpoint) {
|
||||||
Log::error('no known endpoint to post to');
|
|
||||||
return redirect(route('micropub-client'))->withErrors('Unable to determine micropub API endpoint', 'endpoint');
|
return redirect(route('micropub-client'))->withErrors('Unable to determine micropub API endpoint', 'endpoint');
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = $this->postNoteRequest($request, $micropubEndpoint, $token);
|
$response = $this->postNoteRequest($request, $micropubEndpoint, $token);
|
||||||
|
|
||||||
if ($response->getStatusCode() == 201) {
|
if ($response->getStatusCode() == 201) {
|
||||||
Log::info('redirecting to note');
|
|
||||||
$location = $response->getHeader('Location');
|
$location = $response->getHeader('Location');
|
||||||
if (is_array($location)) {
|
if (is_array($location)) {
|
||||||
return redirect($location[0]);
|
return redirect($location[0]);
|
||||||
|
@ -78,7 +75,7 @@ class MicropubClientController extends Controller
|
||||||
|
|
||||||
return redirect($location);
|
return redirect($location);
|
||||||
}
|
}
|
||||||
Log::error('note not created');
|
|
||||||
return redirect(route('micropub-client'))->withErrors('Endpoint didn’t create the note.', 'endpoint');
|
return redirect(route('micropub-client'))->withErrors('Endpoint didn’t create the note.', 'endpoint');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue