add email whitelist config

This commit is contained in:
Tokumeikoi 2020-02-09 18:04:40 +08:00
parent d417e70475
commit 078e1e7bd6
2 changed files with 3 additions and 9 deletions

View File

@ -21,7 +21,9 @@ class CommController extends Controller
'data' => [ 'data' => [
'isEmailVerify' => (int)config('v2board.email_verify', 0) ? 1 : 0, 'isEmailVerify' => (int)config('v2board.email_verify', 0) ? 1 : 0,
'isInviteForce' => (int)config('v2board.invite_force', 0) ? 1 : 0, 'isInviteForce' => (int)config('v2board.invite_force', 0) ? 1 : 0,
'isEmailSuffix' => (int)config('v2board.email_suffix_enable', 0) ? 1 : 0 'emailSuffixWhiteList' => (int)config('v2board.email_suffix_enable', 0)
? config('v2board.email_suffix_whitelist', Dict::EMAIL_WHITELIST_SUFFIX_DEFAULT)
: 0
] ]
]); ]);
} }
@ -60,13 +62,6 @@ class CommController extends Controller
]); ]);
} }
public function getEmailSuffix()
{
return response([
'data' => config('v2board.email_suffix_whitelist', Dict::EMAIL_WHITELIST_SUFFIX_DEFAULT)
]);
}
public function pv(Request $request) public function pv(Request $request)
{ {
$inviteCode = InviteCode::where('code', $request->input('invite_code'))->first(); $inviteCode = InviteCode::where('code', $request->input('invite_code'))->first();

View File

@ -19,7 +19,6 @@ class PassportRoute
// Comm // Comm
$router->get ('/comm/config', 'Passport\\CommController@config'); $router->get ('/comm/config', 'Passport\\CommController@config');
$router->post('/comm/sendEmailVerify', 'Passport\\CommController@sendEmailVerify'); $router->post('/comm/sendEmailVerify', 'Passport\\CommController@sendEmailVerify');
$router->get ('/comm/getEmailSuffix', 'Passport\\CommController@getEmailSuffix');
}); });
} }
} }