Deletion compatibility

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2020-03-25 17:40:59 +01:00
commit ef2e32a571
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
9 changed files with 133 additions and 43 deletions

View file

@ -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()));
}
}