mirror of
https://github.com/Karaka-Management/oms-Tag.git
synced 2026-01-11 15:48:42 +00:00
add tests
This commit is contained in:
parent
c9100c14b0
commit
96fee3c200
|
|
@ -74,7 +74,7 @@ final class ApiController extends Controller
|
|||
{
|
||||
$old = clone TagMapper::get((int) $request->getData('id'));
|
||||
$new = $this->updateTagFromRequest($request);
|
||||
$this->updateModel($request, $old, $new, TagMapper::class, 'tag');
|
||||
$this->updateModel($request->getHeader()->getAccount(), $old, $new, TagMapper::class, 'tag');
|
||||
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Tag', 'Tag successfully updated', $new);
|
||||
}
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ final class ApiController extends Controller
|
|||
public function apiTagDelete(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
||||
{
|
||||
$tag = TagMapper::get((int) $request->getData('id'));
|
||||
$this->deleteModel($request, $tag, TagMapper::class, 'tag');
|
||||
$this->deleteModel($request->getHeader()->getAccount(), $tag, TagMapper::class, 'tag');
|
||||
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Tag', 'Tag successfully deleted', $tag);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user