Software /
code /
prosody
Diff
plugins/mod_http_file_share.lua @ 11350:3287dbdde33e
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 31 Jan 2021 20:38:40 +0100 |
parent | 11349:a219001b449d |
child | 11355:89efa3f2966b |
line wrap: on
line diff
--- 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;