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

Implement subscribe_id and id i32 to EntryUpdate #6

Open
wants to merge 1 commit into
base: rel-0.5.0
Choose a base branch
from

Conversation

lukasmittag
Copy link

Since we decided to use a separate request for ID and path for subscribe call this is the implementation for it.

Some(_metadata) => {
valid_requests.insert(id, vec![broker::Field::Datapoint].into_iter().collect());
}
None => return Err(tonic::Status::new(tonic::Code::NotFound, "Path not found")),
Copy link
Author

Choose a reason for hiding this comment

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

Suggested change
None => return Err(tonic::Status::new(tonic::Code::NotFound, "Path not found")),
None => return Err(tonic::Status::new(tonic::Code::NotFound, "ID not found")),

@@ -165,6 +196,8 @@ pub struct NotificationError {}

#[derive(Debug, Clone, Default)]
pub struct EntryUpdate {
pub id: Option<i32>,
Copy link
Author

Choose a reason for hiding this comment

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

In my opinion EntryUpdate should have one of ìd or path other one could be get by some functions. Does not make sense to save both.

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.

2 participants