mirror of
https://github.com/v2board/v2board.git
synced 2024-11-14 07:29:13 +08:00
update
This commit is contained in:
parent
5699fe09e9
commit
9e55cb2f5d
@ -36,5 +36,19 @@ class TutorialController extends Controller
|
|||||||
|
|
||||||
public function fetch (Request $request) {
|
public function fetch (Request $request) {
|
||||||
$tutorial = Tutorial::select(['title', 'description', 'icon'])->get();
|
$tutorial = Tutorial::select(['title', 'description', 'icon'])->get();
|
||||||
|
$response = [
|
||||||
|
'data' => [
|
||||||
|
'tutorials' => $tutorial,
|
||||||
|
'subscribe_url' => config('v2board.subscribe_url', config('v2board.app_url', env('APP_URL'))) . '/api/v1/client/subscribe?token=' . $user['token']
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$user = User::find($request->session()->get('id'));
|
||||||
|
if ($user->expired_at > time()) {
|
||||||
|
$response['data']['apple_id'] = [
|
||||||
|
'apple_id' => config('v2board.apple_id'),
|
||||||
|
'apple_id_password' => config('v2board.apple_id_password')
|
||||||
|
];
|
||||||
|
}
|
||||||
|
return response($response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user