Remove some un-needed Log commands, fix some array styling
This commit is contained in:
parent
2bef7a154b
commit
7cb0100727
2 changed files with 2 additions and 9 deletions
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
|
|
||||||
use Ramsey\Uuid\Uuid;
|
use Ramsey\Uuid\Uuid;
|
||||||
use App\{Media, Place};
|
use App\{Media, Place};
|
||||||
use Illuminate\Http\{Request, Response};
|
use Illuminate\Http\{Request, Response};
|
||||||
|
@ -97,12 +95,9 @@ class MicropubController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$data['photo'] = [];
|
$data['photo'] = [];
|
||||||
Log::info('Checking request for photos');
|
|
||||||
Log::info($request->all());
|
|
||||||
if (is_array($request->input('photo'))) {
|
if (is_array($request->input('photo'))) {
|
||||||
foreach ($request->input('photo') as $photo) {
|
foreach ($request->input('photo') as $photo) {
|
||||||
if (is_string($photo)) {
|
if (is_string($photo)) {
|
||||||
Log::info($photo);
|
|
||||||
//only supporting media URLs for now
|
//only supporting media URLs for now
|
||||||
$data['photo'][] = $photo;
|
$data['photo'][] = $photo;
|
||||||
}
|
}
|
||||||
|
@ -276,7 +271,7 @@ class MicropubController extends Controller
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'response' => 'error',
|
'response' => 'error',
|
||||||
'error' => 'internal_server_error',
|
'error' => 'internal_server_error',
|
||||||
'error_description' => 'A problem occured handling your request'
|
'error_description' => 'A problem occured handling your request',
|
||||||
], 500);
|
], 500);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -285,7 +280,7 @@ class MicropubController extends Controller
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'response' => 'error',
|
'response' => 'error',
|
||||||
'error' => 'service_unavailable',
|
'error' => 'service_unavailable',
|
||||||
'error_description' => 'Unable to save media to S3'
|
'error_description' => 'Unable to save media to S3',
|
||||||
], 503);
|
], 503);
|
||||||
}
|
}
|
||||||
$media = new Media();
|
$media = new Media();
|
||||||
|
|
|
@ -4,8 +4,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\Services;
|
namespace App\Services;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
|
|
||||||
use App\{Media, Note, Place};
|
use App\{Media, Note, Place};
|
||||||
use App\Jobs\{SendWebMentions, SyndicateToFacebook, SyndicateToTwitter};
|
use App\Jobs\{SendWebMentions, SyndicateToFacebook, SyndicateToTwitter};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue