Router updates + unit tests + React
- added -f flag to run unit test command in order to fail fast - pass only id to "$endpoint->get($id)" in React forms instead of array - updated routers according to the ->get($id) change - refactored a bit the way form creation works - added unit tests for Segments router
This commit is contained in:
@@ -15,9 +15,7 @@ class Subscribers {
|
||||
function __construct() {
|
||||
}
|
||||
|
||||
function get($data = array()) {
|
||||
$id = (isset($data['id']) ? (int) $data['id'] : 0);
|
||||
|
||||
function get($id = false) {
|
||||
$subscriber = Subscriber::findOne($id);
|
||||
if($subscriber !== false && $subscriber->id() > 0) {
|
||||
$segments = $subscriber->segments()->findArray();
|
||||
|
Reference in New Issue
Block a user