Add an order by tittle asc clasuse to the Podcast query. Address #34.

This commit is contained in:
Jordan Petridis 2018-01-29 12:30:13 +02:00
parent b1c3b4f9cc
commit 815639fe5f
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6

View File

@ -27,7 +27,10 @@ pub fn get_podcasts() -> Result<Vec<Podcast>> {
let db = connection();
let con = db.get()?;
podcast.load::<Podcast>(&con).map_err(From::from)
podcast
.order(title.asc())
.load::<Podcast>(&con)
.map_err(From::from)
}
pub fn get_episodes() -> Result<Vec<Episode>> {