feat: don't use shared models for prns
The shared models will eventually contain every field in the database, but prns.cc only needs the fields they currently have, so to cut down on memory usage it shouldn't use the shared models.
This commit is contained in:
parent
ca138efc8f
commit
ccd546759b
|
@ -1,8 +1,10 @@
|
||||||
use pronouns::models::{member::Member, user::User};
|
pub mod models;
|
||||||
|
|
||||||
use rocket::{response::Redirect, Config, State};
|
use rocket::{response::Redirect, Config, State};
|
||||||
use simple_logger;
|
use simple_logger;
|
||||||
use sqlx::{postgres::PgPoolOptions, Pool, Postgres};
|
use sqlx::{postgres::PgPoolOptions, Pool, Postgres};
|
||||||
use std::{env, path::PathBuf};
|
use std::{env, path::PathBuf};
|
||||||
|
use crate::models::{User, Member};
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct User {
|
||||||
|
pub id: String,
|
||||||
|
pub sid: String,
|
||||||
|
pub username: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct Member {
|
||||||
|
pub id: String,
|
||||||
|
pub user_id: String,
|
||||||
|
pub sid: String,
|
||||||
|
pub name: String,
|
||||||
|
}
|
Loading…
Reference in New Issue