Prepare absence API

This commit is contained in:
mckmonster 2024-07-28 11:14:51 +02:00
parent 58ba487565
commit ea96d02bcf
2 changed files with 15 additions and 3 deletions

View file

@ -35,7 +35,7 @@ class ApiController extends YesWikiController
$eleveController->del($clef_action[0]);
}
}
// return ApiResponse($data);
// return new ApiResponse($data);
return $this->wiki->redirect('?Eleves', 200);
}
@ -56,7 +56,19 @@ class ApiController extends YesWikiController
$controle = new Controle($parameters['intitule'], $parameters['matiere'], $parameters['coef'], $eleves);
$controle->createNotes($noteManager);
// return ApiResponse($controle);
// return new ApiResponse($controle);
return $this->wiki->redirect('?Bulletin', 200);
}
/**
* @Route("/api/meeo/absence",methods={"POST"},options={"acl":{"public"}})
*/
public function absence(Request $request) {
// $noteManager = $this->getService(NoteManager::class);
$content = $request->getContent();
parse_str($content, $parameters);
return new ApiResponse($parameters);
// return $this->wiki->redirect('?Bulletin', 200);
}
}

View file

@ -1,4 +1,4 @@
<form class="form-horizontal" action="" method="post">
<form class="form-horizontal" action="?api/meeo/absence" method="post">
<div class="form-group">
<label class="control-label col-sm-2" for="eleve">Eleve:</label>
<div class="col-sm-10">