Closed jofmi closed 10 months ago
@almoxxx can you write the needed changes in the frontend to have a multipart/form call to create an item instead of a application/json call? :)
@almoxxx can you write the needed changes in the frontend to have a multipart/form call to create an item instead of a application/json call? :)
done in a new branch in frontend - pls review if ok :)
Hi, the CreateItemSimple is only a fallback option if there is an error with parsing the multipart form. The problem was that you did not see the error, which is likely still on the frontend. I added a line to log the error.
We might consider to delete CreateItemSimple so that there is only one way to update, which is per multipart.
The multipart error should send an error 500 to the client and here https://github.com/augustin-wien/augustina-frontend/pull/94 is a frontend branch that corrects the multipart form post, which leads to new problems like:
2023-12-13T16:29:51.389Z error 1 error(s) decoding:
* 'ID' expected type 'int', got unconvertible type 'string', value: '0'
Hi, I fixed the typing and removed CreateItemSimple
to avoid confusion. Tested with the frontend branch https://github.com/augustin-wien/augustina-frontend/pull/94, and creating an item works now apart from uploading an image!
Type of change
Description
Create items endpoint now behaves like update items (multipart form)
Checklist: