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

[back 2727] Library usage example #38

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

erikreppel
Copy link
Contributor

@erikreppel erikreppel commented Apr 19, 2024

Modify how we run start_services to pass in a rules engine, give an example of how to add custom routes and rules to mintpool (should be a stack off the prev pr)

@erikreppel erikreppel force-pushed the erik/back-2727-rule-api-customization-example branch from 36d35c7 to 8e8e6fa Compare April 19, 2024 12:50
src/api.rs Outdated
Router::new()
.route("/health", get(health))
.route("/list-all", get(list_all))
.route("/submit-premint", post(submit_premint))
.with_state(AppState { db, controller })
.route("/submit-premintz", post(submit_premint))
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the intention here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I shall delete, was testing compilation of incremental route adding and missed removing 😅

}

fn rule_name(&self) -> &'static str {
"collection address must start with 0xa"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree we should probably go for the trait constant approach. Will probably do that in a follow-up PR later, but it's probably better to make all the breaking changes now.

@erikreppel erikreppel merged commit 58f1707 into main Apr 19, 2024
3 checks passed
@erikreppel erikreppel deleted the erik/back-2727-rule-api-customization-example branch April 19, 2024 13:08
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