-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add new endpoint to get ssh keys from other user #277
Conversation
workflow fails because version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can rebase with main
now as well
src/controllers/users_controller.rs
Outdated
@@ -58,6 +59,24 @@ pub async fn show_user<'r>( | |||
} | |||
} | |||
|
|||
#[get("/users/keys/<username>")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would feel more conform to how a REST API is usually implemented:
#[get("/users/keys/<username>")] | |
#[get("/users/<username>/keys")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly leads to routing collisions, but fixable with route ranking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer using ranking to have a cleaner API
dc4a6ca
to
cad46a3
Compare
The ssh keys are currently returned in a JSON. Is this on purpose for a specific goal? I think it would make more sense to just return them in plain text format as you would find them in an We could do some content negotiation and tweak the https://github.com/ZeusWPI/zauth/blob/main/src/views/accepter.rs to also allow for responding to |
When updating your user profile it also validates now.
Also updated the ssh_keys regex to include new key types.