Remove useless check in controller

This commit is contained in:
Bubka 2020-02-02 20:46:41 +01:00
parent ead006cb07
commit 92d8c36a6d

View File

@ -56,10 +56,8 @@ public function store(Request $request)
* @param \App\TwoFAccount $twofaccount
* @return \Illuminate\Http\Response
*/
public function show($id)
public function show(TwoFAccount $twofaccount)
{
$twofaccount = TwoFAccount::FindOrFail($id);
return response()->json($twofaccount, 200);
}
@ -72,9 +70,7 @@ public function show($id)
*/
public function generateOTP(TwoFAccount $twofaccount)
{
return response()->json(OTP::generate($twofaccount->uri), 200);
}