prepare to remove old log, in favor of activities
Some checks failed
CI/CD Pipeline / test (push) Successful in 17m41s
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled

This commit is contained in:
2025-05-12 22:29:34 +02:00
parent f86d2f6307
commit e4a8caf632
3 changed files with 20 additions and 92 deletions

View File

@@ -3,10 +3,7 @@ use rocket::{form::Form, get, post, routes, FromForm, Route, State};
use rocket_dyn_templates::{context, Template};
use sqlx::SqlitePool;
use crate::{
model::{activity::Activity, log::Log, role::Role, user::AdminUser},
tera::Config,
};
use crate::model::{activity::Activity, role::Role, user::AdminUser};
pub mod boat;
pub mod event;
@@ -16,20 +13,6 @@ pub mod role;
pub mod schnupper;
pub mod user;
#[get("/rss?<key>")]
async fn rss(db: &State<SqlitePool>, key: &str, config: &State<Config>) -> String {
if key.eq(&config.rss_key) {
Log::generate_feed(db).await
} else {
"Not allowed".into()
}
}
#[get("/rss/old", rank = 2)]
async fn show_rss(db: &State<SqlitePool>, _admin: AdminUser) -> String {
Log::show(db).await
}
#[get("/rss", rank = 2)]
async fn show_activities(db: &State<SqlitePool>, _admin: AdminUser) -> String {
Activity::show(db).await
@@ -88,12 +71,6 @@ pub fn routes() -> Vec<Route> {
ret.append(&mut mail::routes());
ret.append(&mut event::routes());
ret.append(&mut role::routes());
ret.append(&mut routes![
rss,
show_rss,
show_activities,
show_list,
list
]);
ret.append(&mut routes![show_activities, show_list, list]);
ret
}