user()) || (! $request->user()->isOwner())) { return response()->json([ 'success' => false, 'message' => 'You are not allowed to update this app.' ], 401); } $request->validate([ 'version' => 'required', ]); $path = Updater::download($request->version); return response()->json([ 'success' => true, 'path' => $path, ]); } }