Conversation
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.
Looks real good already. Wouldn't have done it differently. Looks like it's relatively straightforward to boostrap another set of endpoints. Curious to hear what gave you trouble or wasn't that approachable.
.and(warp::post()) | ||
.and(super::with_registry(registry)) | ||
.and(warp::body::json()) | ||
.and(super::with_subscriptions(subscriptions)) |
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 tend to order the params for the handler with datastores first and inputs, params last. So would swap line 38 and 39.
proxy/src/http/org.rs
Outdated
use crate::registry; | ||
|
||
/// The org with identifier and avatar | ||
pub struct Org { |
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 should live in registry.rs
, or alternatively in a seperate org.rs
. Similar to how we have our own identity, this seems to be upstreams understanding of an org.
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 moved it to registry.rs
proxy/src/http/org.rs
Outdated
get_filter().or(register_filter(registry, subscriptions)) | ||
} | ||
|
||
/// POST /orgs/register |
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.
The only real write operation we have on top-level orgs is the registration, so synonymous with creation. Would say we can just do POST /orgs
for that endpoint.
@MeBrei Org retrieval should be as trivial as the |
Yes, that part I already have I think. Not sure yet, how I can test it (ie test the querying of an existing user) and I need to add the avatar to the response. |
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.
🖖 🛰 💪 🦃
Co-Authored-By: Alexander Simmerl <a.simmerl@gmail.com>
Implements the get and register org endpoints in the rest api and connects them to the registry as part of #277