mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-14 14:02:50 +00:00
Reorganize Crate References
This commit is contained in:
parent
9b049be627
commit
3902a36ea3
6 changed files with 19 additions and 28 deletions
|
@ -1,10 +1,7 @@
|
|||
// CRATES
|
||||
use actix_web::{get, web, HttpResponse, Result};
|
||||
use actix_web::{get, web, HttpResponse, Result, http::StatusCode};
|
||||
use askama::Template;
|
||||
|
||||
#[path = "utils.rs"]
|
||||
mod utils;
|
||||
pub use utils::{request, val, fetch_posts, ErrorTemplate, Flair, Params, Post, Subreddit};
|
||||
use crate::utils::{request, val, fetch_posts, ErrorTemplate, Params, Post, Subreddit};
|
||||
|
||||
// STRUCTS
|
||||
#[derive(Template)]
|
||||
|
@ -45,7 +42,7 @@ pub async fn render(sub_name: String, sort: Option<String>, ends: (Option<String
|
|||
}
|
||||
.render()
|
||||
.unwrap();
|
||||
Ok(HttpResponse::Ok().status(actix_web::http::StatusCode::NOT_FOUND).content_type("text/html").body(s))
|
||||
Ok(HttpResponse::Ok().status(StatusCode::NOT_FOUND).content_type("text/html").body(s))
|
||||
} else {
|
||||
let mut sub = sub_result.unwrap();
|
||||
let items = items_result.unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue