Skip to content

Commit

Permalink
Fixing conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvdlinde committed Sep 2, 2024
1 parent d6ae49a commit e59f389
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/ConditionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function create(): JSONResponse
unset($data[$key]);
}
}

if (isset($data['id'])) {
unset($data['id']);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Db/ConditionMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ 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
{
$qb = $this->db->getQueryBuilder();

$qb->select('*')
->from('larpingapp_characters')
->from('larpingapp_conditions')
->where(
$qb->expr()->eq('id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT))
);
Expand All @@ -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);

Expand Down

0 comments on commit e59f389

Please sign in to comment.