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