Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change routes to use POST Requests for payment actions #138

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Kilobyte22
Copy link

@Kilobyte22 Kilobyte22 commented Mar 25, 2023

Currents the Actions deposit, payment and buy use GET requests. This change adopts it to POST requests.

The API has gotten a new Version v2 which uses POST Requests.

Except for the API change, this has been running successfully at Das Labor for a couple of months

Open Questions:

  • Is this worth a new API version? Maybe just add the POST requests to the exisiting version

@marudor
Copy link
Member

marudor commented Mar 25, 2023

I'm fine with adding v2 APIs incrementally. @YtvwlD?

@YtvwlD
Copy link
Member

YtvwlD commented Mar 31, 2023

Well yes, but this API is not our planned v2.

I'm fine with merging this in general, but this broke non-js usage (because the buttons then do GET requests)

@Kilobyte22
Copy link
Author

Kilobyte22 commented Apr 1, 2023

but this broke non-js usage

This should be fairly easy to solve by adding additional GET routes which would just display a small two-button (OK/Cancel) form. Its not quite as nice UI-wise as previously but it would allow people without JS to use it. I might look into this later, this shouldn't be too difficult

I believe we actually already talked about this in person a couple of months ago

Edit: It might also be feasable to turn the buttons in the UI into actual html buttons, so they could send POST requests without javascript help. I don't know my way around webdev too well though, so I'll have to figure this out

@marudor
Copy link
Member

marudor commented Apr 2, 2023

For post requests without JS you need to make a form out of it. Then let the form submit a post and the button is the submit for that form

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants