# HG changeset patch # User Kim Alvefur # Date 1612121920 -3600 # Node ID 3287dbdde33e46a774a791261241ade1d805929e # Parent a219001b449db73a7defcd2bb1febb4231596133 mod_http_file_share: Reorder arguments 'filetype' is optional, so having it last seems sensible. 'slot' is pretty important, so moving it earlier seems sensible. diff -r a219001b449d -r 3287dbdde33e plugins/mod_http_file_share.lua --- a/plugins/mod_http_file_share.lua Sun Jan 31 17:44:19 2021 +0100 +++ b/plugins/mod_http_file_share.lua Sun Jan 31 20:38:40 2021 +0100 @@ -121,7 +121,7 @@ return true; end -function get_authz(uploader, filename, filesize, filetype, slot) +function get_authz(slot, uploader, filename, filesize, filetype) return jwt.sign(secret, { sub = uploader; filename = filename; @@ -175,7 +175,7 @@ quota_cache:set(uploader, cached_quota); end - local authz = get_authz(uploader, filename, filesize, filetype, slot); + local authz = get_authz(slot, uploader, filename, filesize, filetype); local slot_url = get_url(slot, filename); local upload_url = slot_url;