BitcreditProtocol / E-Bill

Core for Bitcredit project.
https://www.bit.cr/
MIT License
12 stars 2 forks source link

121 move api to json #236

Closed zupzup closed 1 day ago

zupzup commented 2 days ago

This makes progress on #121, transforming all incoming payloads to JSON from form-data.

It also implements a different way to handle file upload, by adding a new /bill/upload_files endpoint, where files can be uploaded, which returns a file_upload_id.

This file_upload_id can then be passed to /bill/issue_bill, which will then lead to the files being added to the bill.

I also added logic to regularly (on startup) clean up temp files, as well as on successfully creating a bill.

I also removed build.rs in this PR, since we don't seem to need it anymore.

warning: Once this is merged, the frontend won't be usable for making changes anymore, since it still uses form-data. However, I now added all existing requests with example responses to Postman. (E-Bill current API)