-
Notifications
You must be signed in to change notification settings - Fork 1
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
replace /answer frontend #58
Comments
Because this is primarily used from mobile I think it'd be best if we could return all the necessary info from one API request instead of three ( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the current abomination:
The goal is to replace this with something nicer. It's a form that is primarily viewed on mobile, so UX-wise that means...
We can bake the data into the response (that's how it works now--templated html) OR you can just use the API:
GET /access/pending/by-token/{token}
returns info on the pending request:...and
GET /ip/info/{addr}
can be used to gather additional IP address info for display:One feature of the current form is that the server checks if the request to
/answer
(to load the form) came from the same IP address as the request that needs approval, and if so, the following message is added to the rendered html:It's helpful to see this when approving a request, so it would be nice to preserve the feature in the new frontend. Without changing any backend APIs, the most straightforward way to do this is to use the
/ip/addr
API endpoint to fetch your IP address and then cross-reference this againstrequest.addr
from the/access/pending/by-token/{token}
response.The text was updated successfully, but these errors were encountered: