getting rid of diesel
This commit is contained in:
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 schema;
|
||||
pub mod auth;
|
||||
pub mod service;
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user