mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-08 15:47:48 +00:00
Use std::fs over actix-files
This commit is contained in:
parent
4f379754f7
commit
f455e2095d
8 changed files with 11 additions and 74 deletions
|
@ -5,7 +5,7 @@ use chrono::{TimeZone, Utc};
|
|||
|
||||
#[path = "utils.rs"]
|
||||
mod utils;
|
||||
use utils::{Params, Flair, Post, User, val, nested_val};
|
||||
use utils::{nested_val, val, Flair, Params, Post, User};
|
||||
|
||||
// STRUCTS
|
||||
#[derive(Template)]
|
||||
|
@ -70,7 +70,7 @@ async fn posts(sub: String, sort: &String) -> Vec<Post> {
|
|||
let title = val(post, "title").await;
|
||||
|
||||
posts.push(Post {
|
||||
title: if title.is_empty() {"Comment".to_string()} else {title},
|
||||
title: if title.is_empty() { "Comment".to_string() } else { title },
|
||||
community: val(post, "subreddit").await,
|
||||
body: String::new(),
|
||||
author: val(post, "author").await,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue