Deletion compatibility
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
85d6a1be47
commit
ef2e32a571
9 changed files with 133 additions and 43 deletions
|
|
@ -389,8 +389,9 @@ class ApiController extends Controller {
|
|||
* @NoAdminRequired
|
||||
* @param int $formId
|
||||
* @return DataResponse
|
||||
* TODO: use hash instead of id ?
|
||||
*/
|
||||
public function removeForm(int $id) {
|
||||
public function deleteForm(int $id) {
|
||||
try {
|
||||
$formToDelete = $this->eventMapper->find($id);
|
||||
} catch (DoesNotExistException $e) {
|
||||
|
|
@ -533,11 +534,6 @@ class ApiController extends Controller {
|
|||
|
||||
$this->eventMapper->insert($event);
|
||||
|
||||
|
||||
|
||||
return new Http\JSONResponse([
|
||||
'id' => $event->getId(),
|
||||
'hash' => $event->getHash(),
|
||||
]);
|
||||
return new Http\JSONResponse($this->getForm($event->getHash()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue