update deps
This commit is contained in:
@ -9,7 +9,7 @@ use crate::status_json::StatusJson;
|
||||
use crate::util::EventNotifier;
|
||||
use bincode::{deserialize, serialize};
|
||||
use rocket::http::Status;
|
||||
use rocket::response::content::Html;
|
||||
use rocket::response::content::RawHtml;
|
||||
use rocket::response::Redirect;
|
||||
use rocket::serde::uuid::Uuid;
|
||||
use rocket::{get, post, uri, State};
|
||||
@ -19,7 +19,7 @@ use std::collections::{BTreeMap, HashMap};
|
||||
use std::time::Duration;
|
||||
|
||||
#[get("/")]
|
||||
pub fn index(_auth: Authorized, db: &State<sled::Db>) -> Result<Html<Template>, StatusJson> {
|
||||
pub fn index(_auth: Authorized, db: &State<sled::Db>) -> Result<RawHtml<Template>, StatusJson> {
|
||||
#[derive(Debug, Serialize, Deserialize, PartialOrd, Ord, PartialEq, Eq)]
|
||||
struct Node {
|
||||
category: category::V,
|
||||
@ -92,7 +92,7 @@ pub fn index(_auth: Authorized, db: &State<sled::Db>) -> Result<Html<Template>,
|
||||
categories: top_level_nodes,
|
||||
};
|
||||
|
||||
Ok(Html(Template::render("index", &context)))
|
||||
Ok(RawHtml(Template::render("index", &context)))
|
||||
}
|
||||
|
||||
#[post("/category/<category_uuid>/start_session")]
|
||||
@ -166,7 +166,7 @@ pub fn session_edit(
|
||||
_auth: Authorized,
|
||||
session_uuid: Uuid,
|
||||
db: &State<sled::Db>,
|
||||
) -> Result<Html<Template>, StatusJson> {
|
||||
) -> Result<RawHtml<Template>, StatusJson> {
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
struct SessionPageContext {
|
||||
session: session::V,
|
||||
@ -184,13 +184,13 @@ pub fn session_edit(
|
||||
session_id: session_uuid,
|
||||
};
|
||||
|
||||
Ok(Html(Template::render("edit_session", &context)))
|
||||
Ok(RawHtml(Template::render("edit_session", &context)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[get("/history")]
|
||||
pub fn history(_auth: Authorized, db: &State<sled::Db>) -> Result<Html<Template>, StatusJson> {
|
||||
pub fn history(_auth: Authorized, db: &State<sled::Db>) -> Result<RawHtml<Template>, StatusJson> {
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
struct HistoryEntryContext {
|
||||
category: category::V,
|
||||
@ -237,5 +237,5 @@ pub fn history(_auth: Authorized, db: &State<sled::Db>) -> Result<Html<Template>
|
||||
context.entries.sort_by_key(|entry| entry.session.started);
|
||||
context.entries.reverse();
|
||||
|
||||
Ok(Html(Template::render("history", &context)))
|
||||
Ok(RawHtml(Template::render("history", &context)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user