Pluralize model modules

This commit is contained in:
Bat 2018-04-23 16:19:28 +01:00
parent 7b3a884ec6
commit 656b201244
8 changed files with 9 additions and 9 deletions

View file

@ -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 {

View file

@ -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;

View file

@ -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)]

View file

@ -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 {

View file

@ -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 {

View file

@ -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;