mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-07 16:58:40 +00:00
More actions implemented
This commit is contained in:
parent
0f860d92f6
commit
069bb61312
|
|
@ -34,6 +34,14 @@ return [
|
|||
],
|
||||
],
|
||||
|
||||
// todo: the order of find and account is bad but needed for now. otherwise the admin/account.* also matches and we match two routes = bad
|
||||
'^.*/api/admin/find/account.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Admin\Controller:apiAccountFind',
|
||||
'verb' => RouteVerb::GET,
|
||||
],
|
||||
],
|
||||
|
||||
'^.*/api/admin/account.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Admin\Controller:apiAccountCreate',
|
||||
|
|
|
|||
|
|
@ -359,10 +359,10 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
$response->set('account', array_values(AccountMapper::getByRequest($request)));
|
||||
}
|
||||
|
||||
public function apiAccountFind()
|
||||
public function apiAccountFind(RequestAbstract $request, ResponseAbstract $response, $data = null)
|
||||
{
|
||||
$response->getHeader()->set('Content-Type', MimeType::M_JSON . '; charset=utf-8', true);
|
||||
$response->set('account', array_values(AccountMapper::find($request->getData('search'))));
|
||||
$response->set('account', array_values(AccountMapper::find($request->getData('search') ?? '')));
|
||||
}
|
||||
|
||||
private function validateAccountCreate(RequestAbstract $request) : array
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user