Skip to content

Commit

Permalink
fix(users injection): make sure that all users can reach api (#12)
Browse files Browse the repository at this point in the history
* make all users reach api

* fix

* change reach_api/reach_api_rt value type from enum to int

Co-authored-by: Kevin Duret <[email protected]>

* fix types on variables

---------

Co-authored-by: Kevin Duret <[email protected]>
  • Loading branch information
mushroomempires and kduret authored Dec 5, 2023
1 parent 6f7a4c9 commit 90df04c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Infrastructure/MySQL/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function inject(User $user, array $properties, array $injectedIds): array
$maxId = $firstId + $count;

$baseQuery = 'INSERT INTO contact ' .
'(contact_id, contact_name, contact_alias, contact_email, contact_lang, contact_activate, contact_admin, contact_oreon) ' .
'(contact_id, contact_name, contact_alias, contact_email, contact_lang, contact_activate, contact_admin, contact_oreon, reach_api, reach_api_rt) ' .
'VALUES ';
$valuesQuery = '';

Expand All @@ -60,7 +60,9 @@ public function inject(User $user, array $properties, array $injectedIds): array
'"en_US.UTF-8",' .
'"1",' .
'"' . $isAdmin . '",' .
'"1"' .
'"1",' .
'1,' .
'1' .
'),';
if ($insertCount === 50000) {
$query = rtrim($baseQuery . $valuesQuery, ',');
Expand Down

0 comments on commit 90df04c

Please sign in to comment.