Fix invalid edit/delete paths on crud lists
This commit is contained in:
parent
a43cb4a0db
commit
0b5862e4d4
2 changed files with 5 additions and 14 deletions
|
|
@ -82,12 +82,6 @@ class RoleController extends BaseController
|
|||
->getQuery()
|
||||
->getResult(Query::HYDRATE_ARRAY);
|
||||
|
||||
// response
|
||||
return $this->json([
|
||||
'meta' => $meta,
|
||||
'data' => $rows
|
||||
]);
|
||||
|
||||
// add crud urls
|
||||
foreach ($rows as $index => $row) {
|
||||
$rows[$index]['update_url'] = $this->generateUrl('role_update', ['id' => $row['id']]);
|
||||
|
|
|
|||
|
|
@ -87,12 +87,6 @@ class UserController extends BaseController
|
|||
->getQuery()
|
||||
->getResult(Query::HYDRATE_ARRAY);
|
||||
|
||||
// response
|
||||
return $this->json([
|
||||
'meta' => $meta,
|
||||
'data' => $rows
|
||||
]);
|
||||
|
||||
// add crud urls
|
||||
foreach ($rows as $index => $row) {
|
||||
$rows[$index]['update_url'] = $this->generateUrl('user_update', ['id' => $row['id']]);
|
||||
|
|
@ -100,7 +94,10 @@ class UserController extends BaseController
|
|||
}
|
||||
|
||||
// response
|
||||
return $this->json(['data' => $rows]);
|
||||
return $this->json([
|
||||
'meta' => $meta,
|
||||
'data' => $rows
|
||||
]);
|
||||
}
|
||||
|
||||
public function create()
|
||||
|
|
|
|||
Loading…
Reference in a new issue