Replicate what aaronpk does in his endpoint
This commit is contained in:
parent
7fcbfec105
commit
95bf302dcd
2 changed files with 3 additions and 2 deletions
|
@ -58,7 +58,7 @@ class MicropubMediaController extends Controller
|
|||
try {
|
||||
$media = Media::latest()->whereDate('created_at', '>=', Carbon::now()->subMinutes(30))->firstOrFail();
|
||||
} catch (ModelNotFoundException $exception) {
|
||||
return response()->json([], 404);
|
||||
return response()->json(['url' => null]);
|
||||
}
|
||||
|
||||
return response()->json(['url' => $media->url]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue