checkSelf API call.
このコミットが含まれているのは:
コミット
b932d9d4d1
|
@ -18,6 +18,12 @@ class AuthController extends Controller {
|
|||
$this->objPermission = new PermissionController();
|
||||
}
|
||||
|
||||
public function checkSelf(Request $request) { // /api/auth/checkself
|
||||
$check = $this->checkLegit($request->username, $request->password);
|
||||
|
||||
return array($check);
|
||||
}
|
||||
|
||||
public function checkLegit($u, $p) {
|
||||
if (!isset($u) || !isset($p)) {
|
||||
return 0;
|
||||
|
|
|
@ -17,6 +17,7 @@ $api = app('Dingo\Api\Routing\Router');
|
|||
|
||||
$api->version('v1', function ($api) {
|
||||
$api->group(['namespace' => 'App\Http\Controllers'], function ($api) {
|
||||
$api->post('/auth/checkself', 'AuthController@checkSelf');
|
||||
$api->post('/auth/getpermissions', 'AuthController@getPerms');
|
||||
$api->post('/auth/login', 'AuthController@login');
|
||||
$api->post('/auth/register', 'AuthController@register');
|
||||
|
|
新しいイシューから参照