getting rid of diesel
This commit is contained in:
parent
81586e2970
commit
7cee103035
1859
Cargo.lock
generated
1859
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -11,11 +11,14 @@ use_barrel = ["barrel", "sqlformat"]
|
|||||||
default = ["use_barrel"]
|
default = ["use_barrel"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
sea-orm = { version = "0.12.10", features = [
|
||||||
|
"runtime-tokio-native-tls",
|
||||||
|
"sqlx-postgres",
|
||||||
|
] }
|
||||||
sqlformat = { version = "0.2.2", optional = true }
|
sqlformat = { version = "0.2.2", optional = true }
|
||||||
anyhow = "1.0.75"
|
anyhow = "1.0.75"
|
||||||
axum = "0.6.20"
|
axum = "0.6.20"
|
||||||
barrel = { version = "0.7.0", optional = true, features = ["pg"] }
|
barrel = { version = "0.7.0", optional = true, features = ["pg"] }
|
||||||
diesel = { version = "2.1.3", features = ["serde_json", "postgres"] }
|
|
||||||
dotenvy = "0.15.7"
|
dotenvy = "0.15.7"
|
||||||
mime_guess = "2.0.4"
|
mime_guess = "2.0.4"
|
||||||
minijinja = { version = "1.0.8", features = [
|
minijinja = { version = "1.0.8", features = [
|
||||||
|
8
src/auth/models.rs
Normal file
8
src/auth/models.rs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
pub struct User {
|
||||||
|
pub id: i32,
|
||||||
|
pub username: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct NewUser<'a> {
|
||||||
|
pub username: &'a str,
|
||||||
|
}
|
@ -1,5 +1,4 @@
|
|||||||
pub mod admin;
|
pub mod admin;
|
||||||
pub mod schema;
|
pub mod auth;
|
||||||
pub mod service;
|
pub mod service;
|
||||||
pub mod state;
|
pub mod state;
|
||||||
pub mod users;
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
// @generated automatically by Diesel CLI.
|
|
||||||
|
|
||||||
diesel::table! {
|
|
||||||
users (id) {
|
|
||||||
id -> Int4,
|
|
||||||
username -> Varchar,
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
use diesel::prelude::*;
|
|
||||||
|
|
||||||
#[derive(Queryable, Selectable)]
|
|
||||||
#[diesel(table_name = crate::schema::users)]
|
|
||||||
#[diesel(check_for_backend(diesel::pg::Pg))]
|
|
||||||
pub struct User {
|
|
||||||
pub id: i32,
|
|
||||||
pub username: String,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Insertable)]
|
|
||||||
#[diesel(table_name = crate::schema::users)]
|
|
||||||
pub struct NewUser<'a> {
|
|
||||||
pub username: &'a str,
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
# Users
|
|
||||||
|
|
||||||
The most basic requirement of most services is authentication or identifying users.
|
|
||||||
|
|
||||||
This module should aim to provide that.
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user