Add crawl metadata to feed & improve model interface
This commit is contained in:
@@ -2,8 +2,9 @@ use axum::{extract::State, Json};
|
||||
use sqlx::PgPool;
|
||||
|
||||
use crate::error::Error;
|
||||
use crate::models::feed::{get_feeds, Feed};
|
||||
use crate::models::feed::Feed;
|
||||
|
||||
pub async fn get(State(pool): State<PgPool>) -> Result<Json<Vec<Feed>>, Error> {
|
||||
Ok(Json(get_feeds(&pool).await?))
|
||||
// TODO: pagination
|
||||
Ok(Json(Feed::get_all(&pool).await?))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user