bugfix with tag queries

This commit is contained in:
Simon
2026-02-10 20:30:58 +00:00
parent 2f1fd8f33a
commit f4fbd62c97

View File

@@ -995,11 +995,17 @@ async fn status(req: HttpRequest) -> Result<impl web::Responder, web::Error> {
} }
async fn videos_post( async fn videos_post(
video_request: web::types::Json<VideosRequest>, mut video_request: web::types::Json<VideosRequest>,
cache: web::types::State<VideoCache>, cache: web::types::State<VideoCache>,
pool: web::types::State<DbPool>, pool: web::types::State<DbPool>,
requester: web::types::State<Requester>, requester: web::types::State<Requester>,
) -> Result<impl web::Responder, web::Error> { ) -> Result<impl web::Responder, web::Error> {
match video_request.query.as_deref() {
Some(query) if query.starts_with("#") => {
video_request.query = Some(query.trim_start_matches("#").to_string());
}
_ => {}
}
let requester = requester.get_ref().clone(); let requester = requester.get_ref().clone();
let mut conn = pool.get().expect("couldn't get db connection from pool"); let mut conn = pool.get().expect("couldn't get db connection from pool");
// Ensure "videos" table exists with two string columns // Ensure "videos" table exists with two string columns