Skip to content

Commit

Permalink
refactor: [#303] store in the database the torrent fields creation_da…
Browse files Browse the repository at this point in the history
…te created_by encoding

Fixed linting errors
  • Loading branch information
MMelchor authored and mario-nt committed Nov 7, 2023
1 parent b738291 commit 0a48536
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/databases/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ impl Database for Sqlite {
.bind(root_hash)
.bind(torrent.info.source.clone())
.bind(torrent.comment.clone())
.bind(torrent.creation_date.clone())
.bind(torrent.creation_date)
.bind(torrent.created_by.clone())
.bind(torrent.encoding.clone())
.execute(&mut *tx)
Expand Down
2 changes: 1 addition & 1 deletion src/models/torrent_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl Torrent {
encoding: db_torrent.encoding.clone(),
httpseeds: None,
announce_list: Some(torrent_announce_urls),
creation_date: db_torrent.creation_date.clone(),
creation_date: db_torrent.creation_date,
comment: db_torrent.comment.clone(),
created_by: db_torrent.created_by.clone(),
}
Expand Down
2 changes: 1 addition & 1 deletion src/services/torrent_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl CreateTorrentRequest {
encoding: self.encoding.clone(),
httpseeds: None,
announce_list: Some(self.announce_urls.clone()),
creation_date: self.creation_date.clone(),
creation_date: self.creation_date,
comment: self.comment.clone(),
created_by: self.created_by.clone(),
}
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/web/api/v1/contexts/torrent/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ mod for_guests {
tags: vec![],
name: test_torrent.index_info.name.clone(),
comment: test_torrent.file_info.comment.clone(),
creation_date: test_torrent.file_info.creation_date.clone(),
creation_date: test_torrent.file_info.creation_date,
created_by: test_torrent.file_info.created_by.clone(),
encoding: test_torrent.file_info.encoding.clone(),
};
Expand Down

0 comments on commit 0a48536

Please sign in to comment.