Skip to content

Commit

Permalink
🔨 #118 alterando addSelectById
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Sep 27, 2022
1 parent c7af6ac commit f2a0865
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions controllers/CreateApiControllesFiles.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ public function addSelectById()
$this->addLine();
$this->addLine(ESP.'public static function selectById(Request $request, Response $response, array $args)');
$this->addLine(ESP.'{');
$this->addLine(ESP.ESP.'$result = self::selectByIdInside($args);');
$this->addLine(ESP.ESP.'$msg = array( \'qtd\'=> \CountHelper::count($result)');
$this->addLine(ESP.ESP.ESP.ESP.ESP.', \'result\'=>$result');
$this->addLine(ESP.ESP.');');
$this->addBodyJsonResponse();
$this->addLine(ESP.ESP.'try{');
$this->addLine(ESP.ESP.ESP.'$result = self::selectByIdInside($args);');
$this->addLine(ESP.ESP.ESP.'$msg = array( \'qtd\'=> \CountHelper::count($result)');
$this->addLine(ESP.ESP.ESP.ESP.ESP.ESP.', \'result\'=>$result');
$this->addLine(ESP.ESP.ESP.');');
$this->addBodyJsonResponse(ESP.ESP.ESP,200);
$this->addCatchBodyJsonResponse(ESP.ESP,500);
$this->addLine(ESP.'}');
}
//--------------------------------------------------------------------------------------
Expand Down

0 comments on commit f2a0865

Please sign in to comment.