make multiple fields public
All checks were successful
ci/woodpecker/manual/publish Pipeline was successful
ci/woodpecker/push/publish Pipeline was successful

This commit is contained in:
Mylloon 2024-06-17 15:56:57 +02:00
parent 9010c7f975
commit b5683be191
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
12 changed files with 17 additions and 17 deletions

View file

@ -6,7 +6,7 @@ use ramhorns::Content;
#[routes] #[routes]
#[get("/.well-known/security.txt")] #[get("/.well-known/security.txt")]
#[get("/security.txt")] #[get("/security.txt")]
async fn security(config: web::Data<Config>) -> impl Responder { pub async fn security(config: web::Data<Config>) -> impl Responder {
HttpResponse::Ok() HttpResponse::Ok()
.content_type(ContentType::plaintext()) .content_type(ContentType::plaintext())
.body(build_securitytxt(config.get_ref().to_owned())) .body(build_securitytxt(config.get_ref().to_owned()))
@ -33,7 +33,7 @@ fn build_securitytxt(config: Config) -> String {
} }
#[get("/humans.txt")] #[get("/humans.txt")]
async fn humans(config: web::Data<Config>) -> impl Responder { pub async fn humans(config: web::Data<Config>) -> impl Responder {
HttpResponse::Ok() HttpResponse::Ok()
.content_type(ContentType::plaintext()) .content_type(ContentType::plaintext())
.body(build_humanstxt(config.get_ref().to_owned())) .body(build_humanstxt(config.get_ref().to_owned()))
@ -60,7 +60,7 @@ fn build_humanstxt(config: Config) -> String {
} }
#[get("/robots.txt")] #[get("/robots.txt")]
async fn robots() -> impl Responder { pub async fn robots() -> impl Responder {
HttpResponse::Ok() HttpResponse::Ok()
.content_type(ContentType::plaintext()) .content_type(ContentType::plaintext())
.body(build_robotstxt()) .body(build_robotstxt())
@ -72,7 +72,7 @@ fn build_robotstxt() -> String {
} }
#[get("/app.webmanifest")] #[get("/app.webmanifest")]
async fn webmanifest(config: web::Data<Config>) -> impl Responder { pub async fn webmanifest(config: web::Data<Config>) -> impl Responder {
HttpResponse::Ok() HttpResponse::Ok()
.content_type(ContentType("application/manifest+json".parse().unwrap())) .content_type(ContentType("application/manifest+json".parse().unwrap()))
.body(build_webmanifest(config.get_ref().to_owned())) .body(build_webmanifest(config.get_ref().to_owned()))

View file

@ -8,7 +8,7 @@ struct Info {
} }
#[get("/love")] #[get("/love")]
async fn love() -> impl Responder { pub async fn love() -> impl Responder {
HttpResponse::Ok().json(Info { HttpResponse::Ok().json(Info {
unix_epoch: 1_605_576_600, unix_epoch: 1_605_576_600,
}) })

View file

@ -29,7 +29,7 @@ const BLOG_DIR: &str = "blog";
const POST_DIR: &str = "posts"; const POST_DIR: &str = "posts";
#[get("/blog")] #[get("/blog")]
async fn index(config: web::Data<Config>) -> impl Responder { pub async fn index(config: web::Data<Config>) -> impl Responder {
Html(build_index(config.get_ref().to_owned())) Html(build_index(config.get_ref().to_owned()))
} }
@ -190,7 +190,7 @@ struct BlogPostTemplate {
} }
#[get("/blog/p/{id}")] #[get("/blog/p/{id}")]
async fn page(path: web::Path<(String,)>, config: web::Data<Config>) -> impl Responder { pub async fn page(path: web::Path<(String,)>, config: web::Data<Config>) -> impl Responder {
Html(build_post( Html(build_post(
&path.into_inner().0, &path.into_inner().0,
config.get_ref().to_owned(), config.get_ref().to_owned(),
@ -281,7 +281,7 @@ fn get_post(
#[routes] #[routes]
#[get("/blog/blog.rss")] #[get("/blog/blog.rss")]
#[get("/blog/rss")] #[get("/blog/rss")]
async fn rss(config: web::Data<Config>) -> impl Responder { pub async fn rss(config: web::Data<Config>) -> impl Responder {
HttpResponse::Ok() HttpResponse::Ok()
.content_type(ContentType(MIME_TYPE_RSS.parse().unwrap())) .content_type(ContentType(MIME_TYPE_RSS.parse().unwrap()))
.body(build_rss(config.get_ref().to_owned())) .body(build_rss(config.get_ref().to_owned()))

View file

@ -13,7 +13,7 @@ use cached::proc_macro::once;
use ramhorns::Content; use ramhorns::Content;
#[get("/contrib")] #[get("/contrib")]
async fn page(config: web::Data<Config>) -> impl Responder { pub async fn page(config: web::Data<Config>) -> impl Responder {
Html(build_page(config.get_ref().to_owned()).await) Html(build_page(config.get_ref().to_owned()).await)
} }

View file

@ -21,7 +21,7 @@ pub struct PathRequest {
} }
#[get("/cours")] #[get("/cours")]
async fn page(info: web::Query<PathRequest>, config: web::Data<Config>) -> impl Responder { pub async fn page(info: web::Query<PathRequest>, config: web::Data<Config>) -> impl Responder {
Html(build_page(&info, config.get_ref().to_owned())) Html(build_page(&info, config.get_ref().to_owned()))
} }

View file

@ -1,7 +1,7 @@
use actix_web::{get, Responder}; use actix_web::{get, Responder};
#[get("/cv")] #[get("/cv")]
async fn page() -> impl Responder { pub async fn page() -> impl Responder {
// Génération du CV depuis un fichier externe TOML ? // Génération du CV depuis un fichier externe TOML ?
// Cf. https://github.com/sinaatalay/rendercv // Cf. https://github.com/sinaatalay/rendercv
// Faudrait une version HTML, et une version PDF // Faudrait une version HTML, et une version PDF

View file

@ -1,7 +1,7 @@
use actix_web::{get, Responder}; use actix_web::{get, Responder};
#[get("/gaming")] #[get("/gaming")]
async fn page() -> impl Responder { pub async fn page() -> impl Responder {
// Liste de mes comptes gaming, de mon setup, de mes configs de jeu, etc. // Liste de mes comptes gaming, de mon setup, de mes configs de jeu, etc.
actix_web::web::Redirect::to("/") actix_web::web::Redirect::to("/")
} }

View file

@ -12,7 +12,7 @@ use crate::{
}; };
#[get("/")] #[get("/")]
async fn page(config: web::Data<Config>) -> impl Responder { pub async fn page(config: web::Data<Config>) -> impl Responder {
Html(build_page(config.get_ref().to_owned())) Html(build_page(config.get_ref().to_owned()))
} }

View file

@ -1,7 +1,7 @@
use actix_web::{get, Responder}; use actix_web::{get, Responder};
#[get("/memorial")] #[get("/memorial")]
async fn page() -> impl Responder { pub async fn page() -> impl Responder {
// Memorial? J'espere ne jamais faire cette page lol // Memorial? J'espere ne jamais faire cette page lol
actix_web::web::Redirect::to("/") actix_web::web::Redirect::to("/")
} }

View file

@ -13,7 +13,7 @@ use crate::{
}; };
#[get("/portfolio")] #[get("/portfolio")]
async fn page(config: web::Data<Config>) -> impl Responder { pub async fn page(config: web::Data<Config>) -> impl Responder {
Html(build_page(config.get_ref().to_owned())) Html(build_page(config.get_ref().to_owned()))
} }

View file

@ -1,7 +1,7 @@
use actix_web::{get, Responder}; use actix_web::{get, Responder};
#[get("/setup")] #[get("/setup")]
async fn page() -> impl Responder { pub async fn page() -> impl Responder {
// Explication de l'histoire de par exemple wiki/cat et le follow up // Explication de l'histoire de par exemple wiki/cat et le follow up
// avec les futures video youtube probablement un shortcut // avec les futures video youtube probablement un shortcut
// vers un billet de blog // vers un billet de blog

View file

@ -8,7 +8,7 @@ use crate::{
}; };
#[get("/web3")] #[get("/web3")]
async fn page(config: web::Data<Config>) -> impl Responder { pub async fn page(config: web::Data<Config>) -> impl Responder {
Html(build_page(config.get_ref().to_owned())) Html(build_page(config.get_ref().to_owned()))
} }