-
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.
- Loading branch information
1 parent
3cd10c9
commit 6a4c880
Showing
14 changed files
with
378 additions
and
50 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,16 +1,21 @@ | ||
use std::sync::Arc; | ||
|
||
use axum::Router; | ||
|
||
use crate::{ | ||
controller, repository, service, | ||
types::{repository::DynLinks as DynLinksRepo, service::DynLinks as DynLinksService, state}, | ||
types::{ | ||
repository::DynLinks as DynLinksRepo, service::DynLinks as DynLinksService, | ||
state::Router as RouterState, | ||
}, | ||
}; | ||
|
||
pub fn new() -> axum::Router { | ||
let links_repo = Arc::new(repository::links::Repository {}) as DynLinksRepo; | ||
pub fn new() -> Router { | ||
let links_service = Arc::new(service::links::Service {}) as DynLinksService; | ||
let links_repo = Arc::new(repository::links::Repository {}) as DynLinksRepo; | ||
|
||
let state = state::Router::new(links_repo, links_service); | ||
axum::Router::new() | ||
let state = RouterState::new(links_service, links_repo); | ||
Router::new() | ||
.merge(controller::links::router()) | ||
.with_state(state) | ||
} |
Oops, something went wrong.