-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename the custom context in the minimal example
- Loading branch information
1 parent
332dee1
commit 078a6b8
Showing
6 changed files
with
13 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// We need to use the disallowed `roadster::app_context::AppContext` type in this module in order | ||
// to implement the required traits used to convert it to/from `AppState`. | ||
#![allow(clippy::disallowed_types)] | ||
use roadster::app_context::AppContext; | ||
|
||
pub type AppState = (); | ||
pub type CustomAppContext = (); | ||
|
||
pub type AppState = AppContext<CustomAppContext>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
use crate::app_state::AppState; | ||
use aide::axum::ApiRouter; | ||
use roadster::app_context::AppContext; | ||
|
||
pub mod example; | ||
|
||
pub fn routes(parent: &str) -> ApiRouter<AppContext<AppState>> { | ||
pub fn routes(parent: &str) -> ApiRouter<AppState> { | ||
ApiRouter::new().merge(example::routes(parent)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters