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