refactor: move function
This commit is contained in:
parent
dcd0143b80
commit
1d9d7c35a1
|
@ -227,12 +227,6 @@ fn common_js() -> BoxedFilter<(impl Reply, )> {
|
|||
.boxed()
|
||||
}
|
||||
|
||||
fn index() -> BoxedFilter<(impl Reply, )> {
|
||||
let route = warp::path::end()
|
||||
.map(|| warp::redirect(Uri::from_static("/listings")));
|
||||
warp::get().and(route).boxed()
|
||||
}
|
||||
|
||||
fn list_js() -> BoxedFilter<(impl Reply, )> {
|
||||
warp::path("list.js")
|
||||
.and(warp::path::end())
|
||||
|
@ -240,6 +234,12 @@ fn list_js() -> BoxedFilter<(impl Reply, )> {
|
|||
.boxed()
|
||||
}
|
||||
|
||||
fn index() -> BoxedFilter<(impl Reply, )> {
|
||||
let route = warp::path::end()
|
||||
.map(|| warp::redirect(Uri::from_static("/listings")));
|
||||
warp::get().and(route).boxed()
|
||||
}
|
||||
|
||||
fn listings(state: Arc<State>) -> BoxedFilter<(impl Reply, )> {
|
||||
async fn logic(state: Arc<State>, codes: Option<String>) -> std::result::Result<impl Reply, Infallible> {
|
||||
let lang = Language::from_codes(codes.as_deref());
|
||||
|
|
Loading…
Reference in New Issue