Work in progress, DB ui

This commit is contained in:
eldadfux
2019-08-18 08:25:32 +03:00
parent 61a6a19b4d
commit 7bbcfa6cb6
8 changed files with 197 additions and 101 deletions
+3 -2
View File
@@ -340,8 +340,8 @@ $utopia->get('/v1/database/:collectionId/documents/:documentId')
$output = $document->getArrayCopy();
$paths = explode('/', $request->getParam('q', ''));
$paths = array_slice($paths, 5, count($paths));
$paths = array_slice($paths, 6, count($paths));
if(count($paths) > 0) {
if(count($paths) % 2 == 1) {
$output = $document->getAttribute(implode('.', $paths));
@@ -353,6 +353,7 @@ $utopia->get('/v1/database/:collectionId/documents/:documentId')
$output = ($output instanceof Document) ? $output->getArrayCopy() : $output;
var_dump($output);
if(!is_array($output)) {
throw new Exception('No document found', 404);
}