share routes refactoring

This commit is contained in:
Čarodej
2022-05-13 11:40:39 +02:00
parent c0e431b384
commit 69a48e8925
35 changed files with 267 additions and 145 deletions
+4 -1
View File
@@ -51,9 +51,12 @@ class Handler extends ExceptionHandler
{
if ($exception instanceof ModelNotFoundException) {
if (in_array('application/json', $request->getAcceptableContentTypes())) {
// Get ids
$ids = implode(', ', $exception->getIds());
return response()->json([
'type' => 'error',
'message' => "We couldn't find your requested item.",
'message' => "We couldn't find the resource you requested with id $ids",
], 404);
}
+1 -1
View File
@@ -39,7 +39,7 @@ class RouteServiceProvider extends ServiceProvider
->middleware('api')
->group(base_path('routes/api.php'));
Route::prefix('api')
Route::prefix('api/sharing')
->middleware('api')
->group(base_path('routes/share.php'));