Skip to content

Commit

Permalink
Fix delete TUS data queries
Browse files Browse the repository at this point in the history
  • Loading branch information
RipleyTom committed Mar 23, 2024
1 parent 8ba6a57 commit 87892c5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.4] - 2024-03-23

### Fixed

- Fixed delete TUS data queries


## [1.2.3] - 2024-03-20

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rpcn"
version = "1.2.3"
version = "1.2.4"
authors = ["RipleyTom <RipleyTom@users.noreply.github.com>"]
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions src/server/database/db_tus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ impl Database {

pub fn tus_delete_user_data_with_slotlist(&self, com_id: &ComId, user: i64, slot_list: &[i32]) -> Result<(), DbError> {
let stmt = format!(
"DELETE FROM tus_data WHERE com_id = ?1 AND owner_id = ?2 AND slot_id IN ({})",
"DELETE FROM tus_data WHERE communication_id = ?1 AND owner_id = ?2 AND slot_id IN ({})",
generate_string_from_slot_list(slot_list)
);

Expand All @@ -641,7 +641,7 @@ impl Database {

pub fn tus_delete_vuser_data_with_slotlist(&self, com_id: &ComId, vuser: &str, slot_list: &[i32]) -> Result<(), DbError> {
let stmt = format!(
"DELETE FROM tus_data_vuser WHERE com_id = ?1 AND vuser = ?2 AND slot_id IN ({})",
"DELETE FROM tus_data_vuser WHERE communication_id = ?1 AND vuser = ?2 AND slot_id IN ({})",
generate_string_from_slot_list(slot_list)
);

Expand Down

0 comments on commit 87892c5

Please sign in to comment.