mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
api enhancements
This commit is contained in:
@@ -35,7 +35,7 @@ class FavouriteController extends Controller
|
||||
/**
|
||||
* Remove folder from user favourites
|
||||
*/
|
||||
public function destroy(string $id): Response|Collection
|
||||
public function destroy(string $id): Response
|
||||
{
|
||||
$user = Auth::user();
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class ShareController extends Controller
|
||||
public function store(
|
||||
CreateShareRequest $request,
|
||||
SendViaEmailAction $sendLinkToEmailAction,
|
||||
): ShareResource {
|
||||
): Response {
|
||||
$item = get_item($request->input('type'), $request->input('id'));
|
||||
|
||||
$this->authorize('owner', $item);
|
||||
@@ -52,7 +52,7 @@ class ShareController extends Controller
|
||||
}
|
||||
|
||||
// Return created shared record
|
||||
return new ShareResource($shared);
|
||||
return response(new ShareResource($shared), 201);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,6 +24,7 @@ class CreateShareRequest extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'id' => 'required|string',
|
||||
'isPassword' => 'required|boolean',
|
||||
'type' => 'required|string',
|
||||
'expiration' => 'integer|nullable',
|
||||
|
||||
@@ -476,7 +476,7 @@ if (! function_exists('make_single_input')) {
|
||||
$data = [];
|
||||
|
||||
// Add data to array
|
||||
$data[$request->name] = $request->value;
|
||||
$data[$request->input('name')] = $request->input('value');
|
||||
|
||||
// Return input
|
||||
return $data;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user