Do not prefill title for less confusion

Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
This commit is contained in:
Jan-Christoph Borchardt 2020-05-09 04:17:30 +02:00
parent 259941cc00
commit 49366596a9
No known key found for this signature in database
GPG key ID: CBD846FC845CBE17

View file

@ -148,7 +148,7 @@ class ApiController extends Controller {
$this->logger->debug('Could not find form');
return new Http\JSONResponse([], Http::STATUS_BAD_REQUEST);
}
if (!$this->formsService->hasUserAccess($id)) {
$this->logger->debug('User has no permissions to get this form');
return new Http\JSONResponse([], Http::STATUS_FORBIDDEN);
@ -171,7 +171,7 @@ class ApiController extends Controller {
16,
ISecureRandom::CHAR_HUMAN_READABLE
));
$form->setTitle('New form');
$form->setTitle('');
$form->setDescription('');
$form->setAccess([
'type' => 'public'
@ -279,7 +279,7 @@ class ApiController extends Controller {
$this->logger->debug('Invalid type');
return new Http\JSONResponse(['message' => 'Invalid type'], Http::STATUS_BAD_REQUEST);
}
try {
$form = $this->formMapper->findById($formId);
} catch (IMapperException $e) {