fix: broken upload of attachment via api#8156
Conversation
fixes an issue raised in 5cf4861 as `$data` is not required but was marked as required. Signed-off-by: Somebodyisnobody <35230554+Somebodyisnobody@users.noreply.github.com>
|
Backlink #7258 |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Fixes an issue that prevents a user from uploading any attachment to a card by using the api endpoint POST /boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments which in practice broke the endpoint completely. The issue was raised in 5cf4861 as
$dataof AttachmentApiController::create() is not required but was marked as required.TODO
--
Checklist
Do you really want a unit test for checking if a parameter is optional?
A general remark: This repository should have API tests, that covers basic cases of the api documented under https://deck.readthedocs.io/en/stable/API. This broken api controller could have been avoided with a simple, static multipart/form-data request to create an attachment.
I am not able to write such tests in PHP otherwise I would have done it. But maybe someone ready this and has some time :)