Skip to content

Commit

Permalink
fix error where all article word data inserted upon reading word stat…
Browse files Browse the repository at this point in the history
…us counts was not commited to db #29
  • Loading branch information
nramos0 committed Sep 13, 2021
1 parent fb6d56a commit 6614e07
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/src/handlers/user/all_article_word_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ pub async fn get_article_list_word_status_counts(
})
.collect::<Vec<WordStatusCountInfo>>();


if let Err(err) = trans.commit().await {
eprintln!("{}", err);
return response::user::get_fetch_article_word_data_error();
}

HttpResponse::Ok().json(GetArticleListWordCountDataResponse {
word_status_count_list,
})
Expand Down

0 comments on commit 6614e07

Please sign in to comment.