Working apalis cron and worker with 0.6.0-rc.5

Also renamed `pool` variables throughout codebase to `db` for clarity.
This commit is contained in:
2024-08-21 01:10:26 -04:00
parent 764d3f23b8
commit 15364ee861
27 changed files with 145 additions and 232 deletions

View File

@@ -13,9 +13,9 @@ use crate::partials::feed_list::feed_list;
pub async fn get(
Query(options): Query<GetFeedsOptions>,
accept: Option<TypedHeader<Accept>>,
State(pool): State<PgPool>,
State(db): State<PgPool>,
) -> Result<impl IntoResponse, impl IntoResponse> {
let feeds = Feed::get_all(&pool, &options).await.map_err(Error::from)?;
let feeds = Feed::get_all(&db, &options).await.map_err(Error::from)?;
if let Some(TypedHeader(accept)) = accept {
if accept == Accept::ApplicationJson {
return Ok::<ApiResponse<Vec<Feed>>, Error>(ApiResponse::Json(feeds));