Better naming of a dbquery function.

This commit is contained in:
Jordan Petridis
2017-12-10 06:11:03 +02:00
parent bc57c33491
commit d8281c70a5
3 changed files with 9 additions and 17 deletions
+2 -3
View File
@@ -193,7 +193,7 @@ impl NewEpisode {
// TODO: Refactor into batch indexes instead.
pub(crate) fn into_episode(self, con: &SqliteConnection) -> Result<Episode> {
self.index(con)?;
Ok(dbqueries::get_episode_from_new_episode(
Ok(dbqueries::get_episode_from_pk(
con,
&self.title,
self.podcast_id,
@@ -201,8 +201,7 @@ impl NewEpisode {
}
pub(crate) fn index(&self, con: &SqliteConnection) -> QueryResult<()> {
// TODO: Change me
let ep = dbqueries::get_episode_from_new_episode(con, &self.title, self.podcast_id);
let ep = dbqueries::get_episode_from_pk(con, &self.title, self.podcast_id);
match ep {
Ok(foo) => {