From c016216883e740688e8dd49ae5d2846772c4249f Mon Sep 17 00:00:00 2001 From: root Date: Sat, 23 Nov 2019 01:41:47 +0800 Subject: [PATCH] update --- .../Controllers/Admin/ConfigController.php | 3 +++ app/Http/Controllers/TutorialController.php | 21 +++++++++++++++++++ app/Http/Requests/Admin/ConfigSave.php | 9 ++++++-- routes/api.php | 3 +++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 app/Http/Controllers/TutorialController.php diff --git a/app/Http/Controllers/Admin/ConfigController.php b/app/Http/Controllers/Admin/ConfigController.php index f3d1a829..5433fbdc 100755 --- a/app/Http/Controllers/Admin/ConfigController.php +++ b/app/Http/Controllers/Admin/ConfigController.php @@ -45,6 +45,9 @@ class ConfigController extends Controller ], 'server' => [ 'server_token' => config('v2board.server_token') + ], + 'tutorial' => [ + 'apple_id' => config('v2board.apple_id') ] ] ]); diff --git a/app/Http/Controllers/TutorialController.php b/app/Http/Controllers/TutorialController.php new file mode 100644 index 00000000..a46747a5 --- /dev/null +++ b/app/Http/Controllers/TutorialController.php @@ -0,0 +1,21 @@ +session()->get('id')); + return response([ + 'data' => config('v2board.app_url', env('APP_URL')) . '/api/v1/client/subscribe?token=' . $user['token'] + ]); + } + + public function getAppleID () { + + } +} diff --git a/app/Http/Requests/Admin/ConfigSave.php b/app/Http/Requests/Admin/ConfigSave.php index fdf80bf0..f6f768e6 100755 --- a/app/Http/Requests/Admin/ConfigSave.php +++ b/app/Http/Requests/Admin/ConfigSave.php @@ -27,7 +27,10 @@ class ConfigSave extends FormRequest 'stripe_pk_live', 'stripe_alipay_enable', 'stripe_wepay_enable', - 'stripe_webhook_key' + 'stripe_webhook_key', + // tutorial + 'apple_id', + 'apple_id_password' ]; } /** @@ -53,7 +56,9 @@ class ConfigSave extends FormRequest 'alipay_privkey' => 'max:2048', // stripe 'stripe_alipay_enable' => 'in:0,1', - 'stripe_wepay_enable' => 'in:0,1' + 'stripe_wepay_enable' => 'in:0,1', + // tutorial + 'apple_id' => 'email' ]; } diff --git a/routes/api.php b/routes/api.php index 2f85040e..57a626b2 100755 --- a/routes/api.php +++ b/routes/api.php @@ -66,6 +66,9 @@ Route::prefix('v1') // Invite Route::get('invite', 'InviteController@index'); Route::get('invite/save', 'InviteController@save'); + // Tutorial + Route::get('tutorial/getSubscribeUrl', 'TutorialController@getSubscribeUrl'); + Route::get('tutorial/getAppleID', 'TutorialController@getAppleID'); }); // Passport