From 90b4946ce8b72c5d1d7fc66110b6ac97c7b66df8 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 25 May 2025 11:23:36 +1200 Subject: [PATCH] Vaguely working --- build.sh | 2 ++ src/server.cpp | 2 +- test.sh | 47 ++++++++++++++------------------------------- test.sh.downloaded1 | 1 - test.sh.downloaded2 | 1 - 5 files changed, 17 insertions(+), 36 deletions(-) delete mode 100644 test.sh.downloaded1 delete mode 100644 test.sh.downloaded2 diff --git a/build.sh b/build.sh index 4fee093..dfab825 100755 --- a/build.sh +++ b/build.sh @@ -8,6 +8,8 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) CACHE_DIR="${SCRIPT_DIR}/cache" EXE_DIR="${SCRIPT_DIR}/exe" +rm -f ${EXE_DIR}/* + # FUNCTIONS function title() { echo "----------------------------------------" diff --git a/src/server.cpp b/src/server.cpp index a50a38f..57459c9 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -479,7 +479,7 @@ void Server::add_file_metadata(const std::string &file_path, nlohmann::json &met void Server::handle_delete_object(const httplib::Request& req, httplib::Response& res) { std::map params; - if (!validate_write_request(req, res, {"token", "hash"}, params)) { + if (!validate_write_request(req, res, {"hash"}, params)) { return; } diff --git a/test.sh b/test.sh index 6aa0a45..6ccd1e1 100755 --- a/test.sh +++ b/test.sh @@ -51,12 +51,23 @@ BASE_TAG="autotest" # test every action in the README.md file, leaving the system in the same state it was found # and print the output of each action +# Construct metadata JSON +METADATA_JSON=$(cat <