Pluralize model modules
This commit is contained in:
parent
7b3a884ec6
commit
656b201244
@ -2,7 +2,7 @@ use diesel;
|
||||
use diesel::{ QueryDsl, RunQueryDsl, ExpressionMethods, PgConnection };
|
||||
use std::iter::Iterator;
|
||||
use schema::{instances, users};
|
||||
use models::user::User;
|
||||
use models::users::User;
|
||||
|
||||
#[derive(Identifiable, Queryable)]
|
||||
pub struct Instance {
|
||||
|
@ -2,5 +2,5 @@ pub mod blog_authors;
|
||||
pub mod blogs;
|
||||
pub mod instance;
|
||||
pub mod post_authors;
|
||||
pub mod post;
|
||||
pub mod user;
|
||||
pub mod posts;
|
||||
pub mod users;
|
||||
|
@ -8,7 +8,7 @@ use db_conn::DbConn;
|
||||
use models::blogs::*;
|
||||
use models::blog_authors::*;
|
||||
use models::instance::Instance;
|
||||
use models::user::User;
|
||||
use models::users::User;
|
||||
use activity_pub::Actor;
|
||||
|
||||
#[get("/~/<name>", rank = 2)]
|
||||
|
@ -7,9 +7,9 @@ use heck::KebabCase;
|
||||
use utils;
|
||||
use db_conn::DbConn;
|
||||
use models::blogs::*;
|
||||
use models::post::*;
|
||||
use models::posts::*;
|
||||
use models::post_authors::*;
|
||||
use models::user::User;
|
||||
use models::users::User;
|
||||
|
||||
#[get("/~/<blog>/<slug>", rank = 3)]
|
||||
fn details(blog: String, slug: String, conn: DbConn) -> String {
|
||||
|
@ -2,12 +2,12 @@ use std::collections::HashMap;
|
||||
use rocket_contrib::Template;
|
||||
use rocket::response::Redirect;
|
||||
use rocket::request::Form;
|
||||
use models::user::User;
|
||||
use models::users::User;
|
||||
use rocket::response::status::NotFound;
|
||||
use rocket::http::Cookies;
|
||||
use db_conn::DbConn;
|
||||
use rocket::http::Cookie;
|
||||
use models::user::AUTH_COOKIE;
|
||||
use models::users::AUTH_COOKIE;
|
||||
|
||||
#[get("/login")]
|
||||
fn new() -> Template {
|
||||
|
@ -4,7 +4,7 @@ use rocket_contrib::{Json, Template};
|
||||
use std::collections::HashMap;
|
||||
|
||||
use db_conn::DbConn;
|
||||
use models::user::*;
|
||||
use models::users::*;
|
||||
use models::instance::Instance;
|
||||
use activity_pub::Actor;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user