aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2018-04-16 18:17:28 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2018-04-16 18:17:28 +0200
commitb2855d63a7805b2f588a5e7d90e19ee0b65d068c (patch)
tree7c70ac5eebfa452b196cbd6c7bafa1246d0e2650
parentmod_push: Add function specification (diff)
mod_http_upload*: Add function specifications
-rw-r--r--src/mod_http_upload.erl2
-rw-r--r--src/mod_http_upload_quota.erl4
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mod_http_upload.erl b/src/mod_http_upload.erl
index 4e522e9b1..f6910087d 100644
--- a/src/mod_http_upload.erl
+++ b/src/mod_http_upload.erl
@@ -217,6 +217,8 @@ mod_opt_type(thumbnail) ->
false
end.
+-spec mod_options(binary()) -> [{atom(), any()}].
+
mod_options(_Host) ->
[{host, <<"upload.@HOST@">>},
{hosts, []},
diff --git a/src/mod_http_upload_quota.erl b/src/mod_http_upload_quota.erl
index 6e5b430c5..d36b71906 100644
--- a/src/mod_http_upload_quota.erl
+++ b/src/mod_http_upload_quota.erl
@@ -92,6 +92,8 @@ mod_opt_type(max_days) ->
(infinity) -> infinity
end.
+-spec mod_options(binary()) -> [{atom(), any()}].
+
mod_options(_) ->
[{access_soft_quota, soft_upload_quota},
{access_hard_quota, hard_upload_quota},
@@ -106,6 +108,8 @@ depends(_Host, _Opts) ->
%% gen_server callbacks.
%%--------------------------------------------------------------------
+-spec init(list()) -> {ok, state()}.
+
init([ServerHost, Opts]) ->
process_flag(trap_exit, true),
AccessSoftQuota = gen_mod:get_opt(access_soft_quota, Opts),