fixed get_previous_events endpoint
This commit is contained in:
parent
df532dcf8b
commit
98568e38e2
@ -17,5 +17,4 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|||||||
sha256 = "1.1"
|
sha256 = "1.1"
|
||||||
jsonwebtoken = "8.3"
|
jsonwebtoken = "8.3"
|
||||||
tera = "1"
|
tera = "1"
|
||||||
genpdf = "0.2"
|
|
||||||
lazy_static = "1.4"
|
lazy_static = "1.4"
|
||||||
|
|||||||
@ -135,7 +135,7 @@ pub async fn get_recent_events(
|
|||||||
e.created_by
|
e.created_by
|
||||||
FROM events e
|
FROM events e
|
||||||
INNER JOIN event_attendees ea
|
INNER JOIN event_attendees ea
|
||||||
ON ea.event_id = e.id
|
ON ea.event_id = e.id AND ea.confirmed
|
||||||
WHERE
|
WHERE
|
||||||
ea.user_id = $1
|
ea.user_id = $1
|
||||||
;
|
;
|
||||||
|
|||||||
@ -10,12 +10,6 @@ use axum::{
|
|||||||
Json,
|
Json,
|
||||||
};
|
};
|
||||||
use axum_auth::AuthBearer;
|
use axum_auth::AuthBearer;
|
||||||
use genpdf::{
|
|
||||||
elements::{self, TableLayout},
|
|
||||||
fonts::{self, FontFamily},
|
|
||||||
style::{Style, StyledString},
|
|
||||||
Document,
|
|
||||||
};
|
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use sqlx::{query_as, types::chrono::Local};
|
use sqlx::{query_as, types::chrono::Local};
|
||||||
@ -98,5 +92,5 @@ pub async fn get_report(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
(StatusCode::OK, Json(json!({ "report": report }))).into_response()
|
(StatusCode::OK, report).into_response()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user