mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-23 18:40:34 +00:00
Show 6 articles on the home and on profiles
This commit is contained in:
parent
e403099f47
commit
7a3215edaa
2 changed files with 3 additions and 3 deletions
|
@ -15,7 +15,7 @@ use models::{
|
|||
fn index(conn: DbConn, user: Option<User>) -> Template {
|
||||
match Instance::get_local(&*conn) {
|
||||
Some(inst) => {
|
||||
let recents = Post::get_recents(&*conn, 5);
|
||||
let recents = Post::get_recents(&*conn, 6);
|
||||
|
||||
Template::render("instance/index", json!({
|
||||
"instance": inst,
|
||||
|
|
|
@ -34,8 +34,8 @@ fn me(user: Option<User>) -> Result<Redirect,Flash<Redirect>> {
|
|||
#[get("/@/<name>", rank = 2)]
|
||||
fn details(name: String, conn: DbConn, account: Option<User>) -> Template {
|
||||
let user = User::find_by_fqn(&*conn, name).unwrap();
|
||||
let recents = Post::get_recents_for_author(&*conn, &user, 5);
|
||||
let reshares = Reshare::get_recents_for_author(&*conn, &user, 5);
|
||||
let recents = Post::get_recents_for_author(&*conn, &user, 6);
|
||||
let reshares = Reshare::get_recents_for_author(&*conn, &user, 6);
|
||||
let user_id = user.id.clone();
|
||||
let n_followers = user.get_followers(&*conn).len();
|
||||
|
||||
|
|
Loading…
Reference in a new issue