You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0277]: the trait bound rocket_auth::AdminUser: FromRequest<'_> is not satisfied
--> src/admin/bp_user.rs:27:22
|
27 | fn admin_panel(user: AdminUser) -> String {
| ^^^^^^^^^ the trait FromRequest<'_> is not implemented for rocket_auth::AdminUser
The text was updated successfully, but these errors were encountered:
Specifying the rc1 cleared this up.
rocket = { version = "0.5.0-rc.1", features = ["json", "secrets", "uuid"]}
rocket_dyn_templates = { version = "0.1.0-rc.1", features = ["tera"]}
rust 1.60 stable
rocket_auth = { version = "0.4.0", features = ["sqlx-postgres"] }
rocket = { git = "https://github.com/SergioBenitez/Rocket/", features = ["json", "secrets", "uuid"]}
rocket_dyn_templates = { git = "https://github.com/SergioBenitez/Rocket/", features = ["tera"]}
I see the traits in the rocket_auth lib.......so, obviously, I'm doing something silly. Looking for input on what I'm doing wrong.
use rocket_auth::{Users, Error, Auth, Signup, Login, User, AdminUser};
#[get("/admin-panel")]
fn admin_panel(user: AdminUser) -> String {
format!("Hello {}.", user.email())
}
error[E0277]: the trait bound
rocket_auth::AdminUser: FromRequest<'_>
is not satisfied--> src/admin/bp_user.rs:27:22
|
27 | fn admin_panel(user: AdminUser) -> String {
| ^^^^^^^^^ the trait
FromRequest<'_>
is not implemented forrocket_auth::AdminUser
The text was updated successfully, but these errors were encountered: