-
Notifications
You must be signed in to change notification settings - Fork 3
fix(soup): soup without email link #427
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
Conversation
| "dep:model_user", | ||
| "dep:utoipa", | ||
| "email/axum", | ||
| "item_filters/schema", |
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.
is this needed?
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.
Its a missing feature right now if you run cargo test -p soup --all-features
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.
so yes
| State(service): State<SoupRouterState<T, U>>, | ||
| Cached(MacroUserExtractor { macro_user_id, .. }): Cached<MacroUserExtractor>, | ||
| Cached(EmailLinkExtractor(link, _)): Cached<EmailLinkExtractor<U>>, | ||
| email_link: Result<Cached<EmailLinkExtractor<U>>, EmailLinkErr>, |
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.
should this be cached? if the user enables email won't the link extractor be none even tho there should be one?
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.
axum cache is unique per http request, it means if the handler tries to extract multiple times it will only query the db 1 time for that request
Summary
This PR fixes an issue where soup would fail if the user does not have an email link.
There is unit tests for the changed behaviour
Screenshots, GIFs, and Videos