mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-08 07:37:45 +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;
|
||||
use utils::{nested_val, request, fetch_posts, ErrorTemplate, Params, Post, User};
|
||||
use crate::utils::{nested_val, request, fetch_posts, ErrorTemplate, Params, Post, User};
|
||||
|
||||
// STRUCTS
|
||||
#[derive(Template)]
|
||||
|
@ -28,7 +25,7 @@ async fn render(username: String, sort: String) -> Result<HttpResponse> {
|
|||
}
|
||||
.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 s = UserTemplate {
|
||||
user: user.unwrap(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue