Fix validation of attachment data

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2022-11-03 20:37:47 +01:00
parent 5359ec34ef
commit 333206c549
2 changed files with 2 additions and 1 deletions

View File

@@ -193,7 +193,7 @@ class AttachmentService {
* @throws BadRequestException
*/
public function create($cardId, $type, $data) {
$this->attachmentServiceValidator->check(compact('cardId', 'type', 'data'));
$this->attachmentServiceValidator->check(compact('cardId', 'type'));
$this->permissionService->checkPermission($this->cardMapper, $cardId, Acl::PERMISSION_EDIT);

View File

@@ -67,6 +67,7 @@ class AttachmentContext implements Context {
* @Given remember the last attachment as :arg1
*/
public function rememberTheLastAttachmentAs($arg1) {
$this->requestContext->theResponseShouldHaveStatusCode(200);
$this->lastAttachment = $this->requestContext->getResponseBodyFromJson();
$this->rememberedAttachments[$arg1] = $this->lastAttachment;
}