--- a/mod_storage_s3/mod_storage_s3.lua Sat Oct 14 21:40:20 2023 +0200
+++ b/mod_storage_s3/mod_storage_s3.lua Sat Oct 14 21:40:46 2023 +0200
@@ -142,7 +142,12 @@
end
function keyval:set(user, data)
- return async.wait_for(new_request("PUT", self:_path(user), data));
+
+ if data == nil or (type(data) == "table" and next(data) == nil) then
+ return async.wait_for(new_request("DELETE", self:_path(user)));
+ end
+
+ return async.wait_for(new_request("PUT", self:_path(user), nil, data));
end
function keyval:users()