diff --git a/lib/Controller/ConditionsController.php b/lib/Controller/ConditionsController.php index 6b5e440..392d74b 100644 --- a/lib/Controller/ConditionsController.php +++ b/lib/Controller/ConditionsController.php @@ -147,7 +147,7 @@ public function create(): JSONResponse unset($data[$key]); } } - + if (isset($data['id'])) { unset($data['id']); } diff --git a/lib/Db/ConditionMapper.php b/lib/Db/ConditionMapper.php index dccb540..7f78aa4 100644 --- a/lib/Db/ConditionMapper.php +++ b/lib/Db/ConditionMapper.php @@ -12,7 +12,7 @@ class CharacterMapper extends QBMapper { public function __construct(IDBConnection $db) { - parent::__construct($db, 'larpingapp_characters'); + parent::__construct($db, 'larpingapp_conditions'); } public function find(int $id): Condition @@ -20,7 +20,7 @@ public function find(int $id): Condition $qb = $this->db->getQueryBuilder(); $qb->select('*') - ->from('larpingapp_characters') + ->from('larpingapp_conditions') ->where( $qb->expr()->eq('id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT)) ); @@ -33,7 +33,7 @@ public function findAll(?int $limit = null, ?int $offset = null, ?array $filters $qb = $this->db->getQueryBuilder(); $qb->select('*') - ->from('larpingapp_characters') + ->from('larpingapp_conditions') ->setMaxResults($limit) ->setFirstResult($offset);