mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-02-10 05:18:42 +00:00
Routing
This commit is contained in:
parent
d3fa3d9bcd
commit
38761c9034
|
|
@ -57,4 +57,23 @@ return [
|
|||
'verb' => RouteVerb::GET,
|
||||
],
|
||||
],
|
||||
|
||||
'^.*/api/organization/position.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Organization\Controller:apiPositionCreate',
|
||||
'verb' => RouteVerb::SET,
|
||||
],
|
||||
],
|
||||
'^.*/api/organization/department.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Organization\Controller:apiDepartmentCreate',
|
||||
'verb' => RouteVerb::SET,
|
||||
],
|
||||
],
|
||||
'^.*/api/organization/unit.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Organization\Controller:apiUnitCreate',
|
||||
'verb' => RouteVerb::SET,
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
|
||||
PositionMapper::create($position);
|
||||
|
||||
$response->set('unit', $position->jsonSerialize());
|
||||
$response->set('position', $position->jsonSerialize());
|
||||
}
|
||||
|
||||
public function apiDepartmentCreate(RequestAbstract $request, ResponseAbstract $response, $data = null)
|
||||
|
|
@ -291,6 +291,6 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
|
||||
DepartmentMapper::create($department);
|
||||
|
||||
$response->set('unit', $department->jsonSerialize());
|
||||
$response->set('department', $department->jsonSerialize());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user