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

Add app ip extractor #30

Merged
merged 6 commits into from
Oct 25, 2023
Merged

Add app ip extractor #30

merged 6 commits into from
Oct 25, 2023

Conversation

gorm-issuu
Copy link
Contributor

@gorm-issuu gorm-issuu commented Oct 6, 2023

This is a generally useful thing to be able to easily get out of a request and even though it is possible to do currently (via the delivery) it is more cumbersome than it has to be. This PR makes it straight forward by having a simple wrapper that implements the Extract trait.

use kanin::extract::AppId;
async fn my_handler(AppId(app_id): AppId) {
    dbg!(app_id);
}

This is generally useful thing to be able to easily get out of a
request and even thought it is possible to do currently (via the
delivery) it is more cumbersome than it has to be. This PR makes it
straight forward by having a simple wrapper that implements the
`Extractor` trait.

    use kanin::extract::AppId;
    async fn my_handler(AppId(app_id): AppId) {
        dbg!(app_id);
    }
@gorm-issuu gorm-issuu requested a review from a team as a code owner October 6, 2023 09:22
Copy link
Contributor

@Victor-N-Suadicani Victor-N-Suadicani left a comment

Choose a reason for hiding this comment

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

Approved on the assumption that the version is fixed

kanin/Cargo.toml Outdated
@@ -1,6 +1,6 @@
[package]
name = "kanin"
version = "0.25.0"
version = "0.25.1"
Copy link
Contributor

Choose a reason for hiding this comment

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

The minor version should be incremented as a feature is added.

@gorm-issuu gorm-issuu merged commit c9c1ab1 into main Oct 25, 2023
5 checks passed
@gorm-issuu gorm-issuu deleted the add-app-ip-extractor branch October 25, 2023 09:26
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