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

feat: interest registration endpoint #246

Merged

Conversation

smrz2001
Copy link
Collaborator

No description provided.

Copy link

linear bot commented Jan 28, 2024

Copy link
Collaborator

@nathanielc nathanielc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once you add some tests. Should be a simple copy past edit of the existing tests.

@smrz2001
Copy link
Collaborator Author

LGTM once you add some tests. Should be a simple copy past edit of the existing tests.

Thanks! And yes, haha, was planning to add unit tests before marking the PR ready 😁 (after I get the e2e tests passing)

@smrz2001 smrz2001 force-pushed the feature/ws1-1452-create-interest-endpoint-on-ceramic-api branch from 7a3b8d8 to 8123763 Compare January 30, 2024 01:48
@smrz2001 smrz2001 requested a review from dav1do January 30, 2024 17:32
@smrz2001 smrz2001 marked this pull request as ready for review January 30, 2024 17:32
@smrz2001 smrz2001 requested a review from nathanielc January 30, 2024 17:36
Copy link
Collaborator

@nathanielc nathanielc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

stream_id: Option<String>,
_context: &C,
) -> Result<InterestsSortKeySortValuePostResponse, ApiError> {
debug!(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, this debug is redundant as the params are already part of the tracing context and will get logged at debug when the function returns successfully or logged at error in the case of an error.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, ok, taking it out.

@smrz2001 smrz2001 enabled auto-merge January 30, 2024 18:21
Copy link
Contributor

@dav1do dav1do left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one comment but I think it can be handled separately.

stop_builder.with_controller(&controller).with_max_init(),
),
(None, Some(_)) => {
return Err(ApiError(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a pattern we've been using, but we could add a 400 response and return e.g InterestsSortKeySortValuePostResponse::BadRequest instead of a 500 for things like this. Might be nice to improve the API responses across the board, potentially as a separate ticket. I know changing this would require some refactoring given how this code is shared.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I like that, it's more aligned with how the status codes should be used.

@smrz2001 smrz2001 added this pull request to the merge queue Jan 30, 2024
Merged via the queue into main with commit 84fa5e3 Jan 30, 2024
4 checks passed
@smrz2001 smrz2001 deleted the feature/ws1-1452-create-interest-endpoint-on-ceramic-api branch January 30, 2024 18:41
@github-actions github-actions bot mentioned this pull request Feb 6, 2024
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.

3 participants