diff --git a/app/miniapi/controller/CustomerCenter.php b/app/miniapi/controller/CustomerCenter.php index b6c5f21..79f6ec5 100644 --- a/app/miniapi/controller/CustomerCenter.php +++ b/app/miniapi/controller/CustomerCenter.php @@ -68,6 +68,11 @@ final class CustomerCenter extends Base public function applicant() { + $action = strtolower(trim((string)$this->request->param('_action', ''))); + if ($action === 'save') { + return $this->saveApplicant(); + } + $userId = $this->requireLogin(); if (!is_int($userId)) { return $userId; diff --git a/route/app.php b/route/app.php index 6f3b8b2..29bde63 100644 --- a/route/app.php +++ b/route/app.php @@ -37,7 +37,6 @@ Route::group('miniapi', function () { Route::get('customer-center/applicants', 'CustomerCenter/applicants'); Route::get('customer-center/applications', 'CustomerCenter/applications'); Route::get('customer-center/orders', 'CustomerCenter/orders'); - Route::post('customer-center/save-applicant', 'CustomerCenter/saveApplicant'); Route::post('customer-center/applicant/save', 'CustomerCenter/saveApplicant'); Route::post('customer-center/applicant/remove', 'CustomerCenter/removeApplicant'); Route::post('customer-center/applicant', 'CustomerCenter/applicant')->completeMatch();