Skip to content

Commit

Permalink
align generators
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Oct 23, 2024
1 parent 14b3f48 commit 44cfb97
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 17 deletions.
3 changes: 1 addition & 2 deletions loco-gen/src/templates/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ injections:
content: " .add_route(controllers::{{ file_name }}::routes())"
---
#![allow(clippy::unused_async)]
use loco_rs::prelude::*;
use axum::debug_handler;
use loco_rs::{axum::debug_handler, prelude::*};


#[debug_handler]
Expand Down
3 changes: 1 addition & 2 deletions loco-gen/src/templates/controller/api/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ injections:
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::unnecessary_struct_initialization)]
#![allow(clippy::unused_async)]
use loco_rs::prelude::*;
use axum::debug_handler;
use loco_rs::{axum::debug_handler, prelude::*};

#[debug_handler]
pub async fn index(State(_ctx): State<AppContext>) -> Result<Response> {
Expand Down
3 changes: 1 addition & 2 deletions loco-gen/src/templates/controller/html/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ injections:
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::unnecessary_struct_initialization)]
#![allow(clippy::unused_async)]
use loco_rs::prelude::*;
use axum::debug_handler;
use loco_rs::{axum::debug_handler, prelude::*};

{% for action in actions -%}
#[debug_handler]
Expand Down
3 changes: 1 addition & 2 deletions loco-gen/src/templates/controller/htmx/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ injections:
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::unnecessary_struct_initialization)]
#![allow(clippy::unused_async)]
use loco_rs::prelude::*;
use axum::debug_handler;
use loco_rs::{axum::debug_handler, prelude::*};

{% for action in actions -%}
#[debug_handler]
Expand Down
3 changes: 1 addition & 2 deletions loco-gen/src/templates/scaffold/api/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ injections:
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::unnecessary_struct_initialization)]
#![allow(clippy::unused_async)]
use loco_rs::prelude::*;
use loco_rs::{axum::debug_handler, prelude::*};
use serde::{Deserialize, Serialize};
use axum::debug_handler;

use crate::models::_entities::{{file_name | plural}}::{ActiveModel, Entity, Model};

Expand Down
9 changes: 5 additions & 4 deletions loco-gen/src/templates/scaffold/html/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ injections:
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::unnecessary_struct_initialization)]
#![allow(clippy::unused_async)]
use loco_rs::prelude::*;
use loco_rs::{
axum::{debug_handler, extract::Form, response::Redirect},
prelude::*,
sea_orm::{sea_query::Order, QueryOrder},
};
use serde::{Deserialize, Serialize};
use axum::{extract::Form, response::Redirect};
use sea_orm::{sea_query::Order, QueryOrder};
use axum::debug_handler;

use crate::{
models::_entities::{{file_name | plural}}::{ActiveModel, Column, Entity, Model},
Expand Down
8 changes: 5 additions & 3 deletions loco-gen/src/templates/scaffold/htmx/controller.t
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ injections:
#![allow(clippy::missing_errors_doc)]
#![allow(clippy::unnecessary_struct_initialization)]
#![allow(clippy::unused_async)]
use loco_rs::prelude::*;
use loco_rs::{
axum::debug_handler,
prelude::*,
sea_orm::{sea_query::Order, QueryOrder},
};
use serde::{Deserialize, Serialize};
use sea_orm::{sea_query::Order, QueryOrder};
use axum::debug_handler;

use crate::{
models::_entities::{{file_name | plural}}::{ActiveModel, Column, Entity, Model},
Expand Down

0 comments on commit 44cfb97

Please sign in to comment.