Skip to content

Commit

Permalink
📝 APP #270 correção exemplo
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Sep 24, 2022
1 parent e7d5152 commit d28376c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@ public static function save(Request $request, Response $response, array $args)
{
$vo = new \Acesso_perfilVO;
$msg = \Message::GENERIC_INSERT;
if($request->isPut()){
if($request->getMethod() == 'PUT'){
$msg = \Message::GENERIC_UPDATE;
$result = self::selectByIdInside($args);
$bodyRequest = $result[0];
$vo = \FormDinHelper::setPropertyVo($bodyRequest,$vo);
}
$bodyRequest = json_decode($request->getBody(),true);
if(empty($bodyRequest)){
$bodyRequest = $request->getParsedBody();
}
$vo = \FormDinHelper::setPropertyVo($bodyRequest,$vo);

$controller = new \Acesso_perfil;
Expand Down

0 comments on commit d28376c

Please sign in to comment.