Skip to content

Commit

Permalink
Fix insert one operation
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelTallet committed Jul 14, 2020
1 parent 84c2023 commit 310568d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @var string
*/
define('MPG_APP_VERSION', '0.9.5');
define('MPG_APP_VERSION', '0.9.6');

/**
* Development mode?
Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/CollectionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function enumFieldsAction($databaseName, $collectionName) : Response {
$documents = $collection->find([], ['limit' => 1])->toArray();

if ( empty($documents) ) {
return new Response(404, 'Collection is empty');
return new Response(200, json_encode([]), ['Content-Type' => 'application/json']);
}

$documentFields = MongoDBHelper::arrayKeysMulti(
Expand Down

0 comments on commit 310568d

Please sign in to comment.