diff --git a/services/backup/src/DatabaseEntities/BackupItem.h b/services/backup/src/DatabaseEntities/BackupItem.h --- a/services/backup/src/DatabaseEntities/BackupItem.h +++ b/services/backup/src/DatabaseEntities/BackupItem.h @@ -73,7 +73,7 @@ std::string getCompactionHolder() const; std::string getAttachmentHolders() const; - void appendAttachmentHolder(const std::string &attachmentHolder); + void addAttachmentHolders(const std::string &attachmentHolders); }; } // namespace database diff --git a/services/backup/src/DatabaseEntities/BackupItem.cpp b/services/backup/src/DatabaseEntities/BackupItem.cpp --- a/services/backup/src/DatabaseEntities/BackupItem.cpp +++ b/services/backup/src/DatabaseEntities/BackupItem.cpp @@ -1,7 +1,7 @@ #include "BackupItem.h" #include "Constants.h" -#include "GlobalConstants.h" +#include "Tools.h" namespace comm { namespace network { @@ -112,9 +112,9 @@ return this->attachmentHolders; } -void BackupItem::appendAttachmentHolder(const std::string &attachmentHolder) { - this->attachmentHolders += attachmentHolder; - this->attachmentHolders += ATTACHMENT_DELIMITER; +void BackupItem::addAttachmentHolders(const std::string &attachmentHolders) { + this->attachmentHolders += + tools::validateAttachmentHolders(attachmentHolders); } } // namespace database diff --git a/services/backup/src/DatabaseEntities/LogItem.h b/services/backup/src/DatabaseEntities/LogItem.h --- a/services/backup/src/DatabaseEntities/LogItem.h +++ b/services/backup/src/DatabaseEntities/LogItem.h @@ -56,7 +56,7 @@ std::string getValue() const; std::string getAttachmentHolders() const; - void appendAttachmentHolder(const std::string &attachmentHolder); + void addAttachmentHolders(const std::string &attachmentHolders); }; } // namespace database diff --git a/services/backup/src/DatabaseEntities/LogItem.cpp b/services/backup/src/DatabaseEntities/LogItem.cpp --- a/services/backup/src/DatabaseEntities/LogItem.cpp +++ b/services/backup/src/DatabaseEntities/LogItem.cpp @@ -1,7 +1,7 @@ #include "LogItem.h" #include "Constants.h" -#include "GlobalConstants.h" +#include "Tools.h" #include @@ -105,9 +105,9 @@ return this->attachmentHolders; } -void LogItem::appendAttachmentHolder(const std::string &attachmentHolder) { - this->attachmentHolders += attachmentHolder; - this->attachmentHolders += ATTACHMENT_DELIMITER; +void LogItem::addAttachmentHolders(const std::string &attachmentHolders) { + this->attachmentHolders += + tools::validateAttachmentHolders(attachmentHolders); } } // namespace database