Add migrations and user models crud
This commit is contained in:
parent
2141c992d7
commit
30be91390b
13 changed files with 473 additions and 47 deletions
|
|
@ -3,7 +3,7 @@ use askama_web::WebTemplate;
|
|||
use axum::response::{IntoResponse, Response};
|
||||
use snafu::prelude::*;
|
||||
|
||||
use crate::state::config::ConfigError;
|
||||
use crate::{models::user::UserError, state::config::ConfigError};
|
||||
|
||||
#[derive(Template, WebTemplate)]
|
||||
#[template(path = "error.html")]
|
||||
|
|
@ -21,6 +21,14 @@ pub enum AppStateError {
|
|||
ConfigError {
|
||||
source: ConfigError,
|
||||
},
|
||||
#[snafu(display("Migration Error"))]
|
||||
Migration {
|
||||
source: sea_orm::error::DbErr,
|
||||
},
|
||||
#[snafu(display("User Model Error"))]
|
||||
User {
|
||||
source: UserError,
|
||||
},
|
||||
}
|
||||
|
||||
impl IntoResponse for AppStateError {
|
||||
|
|
|
|||
Loading…
Reference in a new issue