mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-27 23:41:56 +02:00
Change order saving endpoint and remove position property
This commit is contained in:
parent
59a63f5a2a
commit
5959b692de
@ -44,7 +44,6 @@ class TwoFAccountController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
$request->merge(['withPosition' => true]);
|
|
||||||
$request->merge(['hideSecret' => true]);
|
$request->merge(['hideSecret' => true]);
|
||||||
|
|
||||||
return TwoFAccountReadResource::collection(TwoFAccount::ordered()->get());
|
return TwoFAccountReadResource::collection(TwoFAccount::ordered()->get());
|
||||||
|
@ -16,7 +16,6 @@ class TwoFAccountReadResource extends TwoFAccountStoreResource
|
|||||||
[
|
[
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'group_id' => $this->group_id,
|
'group_id' => $this->group_id,
|
||||||
'position' => $this->when($request->input('withPosition'), $this->order_column),
|
|
||||||
],
|
],
|
||||||
parent::toArray($request)
|
parent::toArray($request)
|
||||||
);
|
);
|
||||||
|
@ -37,7 +37,7 @@ Route::group(['middleware' => 'auth:api'], function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Route::delete('twofaccounts/batch', 'TwoFAccountController@batchDestroy');
|
Route::delete('twofaccounts/batch', 'TwoFAccountController@batchDestroy');
|
||||||
Route::patch('twofaccounts/sort-order', 'TwoFAccountController@reorder');
|
Route::post('twofaccounts/reorder', 'TwoFAccountController@reorder');
|
||||||
Route::post('twofaccounts/preview', 'TwoFAccountController@preview');
|
Route::post('twofaccounts/preview', 'TwoFAccountController@preview');
|
||||||
Route::get('twofaccounts/{twofaccount}/qrcode', 'QrCodeController@show');
|
Route::get('twofaccounts/{twofaccount}/qrcode', 'QrCodeController@show');
|
||||||
Route::get('twofaccounts/count', 'TwoFAccountController@count');
|
Route::get('twofaccounts/count', 'TwoFAccountController@count');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user