Skip to content

Commit

Permalink
refactor: remove unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
thalesmg committed Jun 6, 2024
1 parent 65b8061 commit 4f78665
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions src/erlazure.erl
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ set_queue_acl(State, Queue, SignedId=#signed_id{}, Options) when is_list(Options
ReqContext = new_req_context(?queue_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_no_content, created).
return_response(Code, Body, ?http_no_content, created).

-spec get_queue_acl(state(), string()) -> {ok, no_acl} | {ok, signed_id()}.
get_queue_acl(State, Queue) ->
Expand Down Expand Up @@ -187,7 +187,7 @@ delete_queue(State, Queue, Options) when is_list(Options) ->
ReqContext = new_req_context(?queue_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_no_content, deleted).
return_response(Code, Body, ?http_no_content, deleted).

put_message(State, Queue, Message) ->
put_message(State, Queue, Message, []).
Expand All @@ -200,7 +200,7 @@ put_message(State, Queue, Message, Options) when is_list(Options) ->
ReqContext = new_req_context(?queue_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_created, created).
return_response(Code, Body, ?http_created, created).

get_messages(State, Queue) ->
get_messages(State, Queue, []).
Expand Down Expand Up @@ -234,7 +234,7 @@ delete_message(State, Queue, MessageId, PopReceipt, Options) when is_list(Option
ReqContext = new_req_context(?queue_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_no_content, deleted).
return_response(Code, Body, ?http_no_content, deleted).

clear_messages(State, Queue) ->
clear_messages(State, Queue, []).
Expand All @@ -246,7 +246,7 @@ clear_messages(State, Queue, Options) when is_list(Options) ->
ReqContext = new_req_context(?queue_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_no_content, deleted).
return_response(Code, Body, ?http_no_content, deleted).

update_message(State, Queue, UpdatedMessage=#queue_message{}, VisibilityTimeout) ->
update_message(State, Queue, UpdatedMessage, VisibilityTimeout, []).
Expand All @@ -261,7 +261,7 @@ update_message(State, Queue, UpdatedMessage=#queue_message{}, VisibilityTimeout,
ReqContext = new_req_context(?queue_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_no_content, updated).
return_response(Code, Body, ?http_no_content, updated).

%%====================================================================
%% Blob
Expand Down Expand Up @@ -306,7 +306,7 @@ delete_container(State, Name, Options) when is_list(Options) ->
RequestContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, RequestContext),
return_response(Code, Body, State, ?http_accepted, deleted).
return_response(Code, Body, ?http_accepted, deleted).

put_block_blob(State, Container, Name, Data) ->
put_block_blob(State, Container, Name, Data, []).
Expand All @@ -323,7 +323,7 @@ put_block_blob(State, Container, Name, Data, Options) when is_list(Options) ->
end,

{Code, Body} = execute_request(ServiceContext, ReqContext1),
return_response(Code, Body, State, ?http_created, created).
return_response(Code, Body, ?http_created, created).

put_page_blob(State, Container, Name, ContentLength) ->
put_page_blob(State, Container, Name, ContentLength, []).
Expand All @@ -337,7 +337,7 @@ put_page_blob(State, Container, Name, ContentLength, Options) when is_list(Optio
ReqContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_created, created).
return_response(Code, Body, ?http_created, created).

put_append_blob(State, Container, Name) ->
put_append_blob(State, Container, Name, []).
Expand All @@ -354,7 +354,7 @@ put_append_blob(State, Container, Name, Options) when is_list(Options) ->
end,

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_created, created).
return_response(Code, Body, ?http_created, created).

append_block(State, Container, Name, Data) ->
append_block(State, Container, Name, Data, []).
Expand All @@ -368,7 +368,7 @@ append_block(State, Container, Name, Data, Options) when is_list(Options) ->
ReqContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_created, appended).
return_response(Code, Body, ?http_created, appended).

list_blobs(State, Container) ->
list_blobs(State, Container, []).
Expand Down Expand Up @@ -411,7 +411,7 @@ snapshot_blob(State, Container, Blob, Options) when is_list(Options) ->
ReqContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_created, created).
return_response(Code, Body, ?http_created, created).

copy_blob(State, Container, Blob, Source) ->
copy_blob(State, Container, Blob, Source, []).
Expand All @@ -423,7 +423,7 @@ copy_blob(State, Container, Blob, Source, Options) when is_list(Options) ->
ReqContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_accepted, created).
return_response(Code, Body, ?http_accepted, created).

delete_blob(State, Container, Blob) ->
delete_blob(State, Container, Blob, []).
Expand All @@ -435,7 +435,7 @@ delete_blob(State, Container, Blob, Options) when is_list(Options) ->
ReqContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_accepted, deleted).
return_response(Code, Body, ?http_accepted, deleted).

put_block(State, Container, Blob, BlockId, BlockContent) ->
put_block(State, Container, Blob, BlockId, BlockContent, []).
Expand All @@ -450,7 +450,7 @@ put_block(State, Container, Blob, BlockId, BlockContent, Options) when is_list(O
ReqContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_created, created).
return_response(Code, Body, ?http_created, created).

put_block_list(State, Container, Blob, BlockRefs) ->
put_block_list(State, Container, Blob, BlockRefs, []).
Expand All @@ -464,7 +464,7 @@ put_block_list(State, Container, Blob, BlockRefs, Options0) when is_list(Options
ReqContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_created, created).
return_response(Code, Body, ?http_created, created).

get_block_list(State, Container, Blob) ->
get_block_list(State, Container, Blob, []).
Expand Down Expand Up @@ -496,7 +496,7 @@ acquire_blob_lease(State, Container, Blob, ProposedId, Duration, Options) when i
ReqContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_created, acquired).
return_response(Code, Body, ?http_created, acquired).

lease_container(State, Name, Mode) ->
lease_container(State, Name, Mode, []).
Expand All @@ -511,7 +511,7 @@ lease_container(State, Name, Mode, Options) when is_atom(Mode), is_list(Options)
ReqContext = new_req_context(?blob_service, ReqOptions, State),

{Code, Body} = execute_request(ServiceContext, ReqContext),
return_response(Code, Body, State, ?http_accepted, deleted).
return_response(Code, Body, ?http_accepted, deleted).

%%====================================================================
%% Table
Expand Down Expand Up @@ -539,7 +539,7 @@ new_table(State, TableName) when is_binary(TableName) ->
ReqContext = new_req_context(?table_service, ReqOptions, State),
ReqContext1 = ReqContext#req_context{ content_type = ?json_content_type },
{Code, Body} = execute_request(ServiceContext, ReqContext1),
return_response(Code, Body, State, ?http_created, created).
return_response(Code, Body, ?http_created, created).

delete_table(State, TableName) when is_binary(TableName) ->
delete_table(State, binary_to_list(TableName));
Expand Down Expand Up @@ -839,7 +839,7 @@ get_req_common_param_specs() ->
#param_spec{ id = ?req_param_include, type = uri, name = "include" },
#param_spec{ id = ?req_param_marker, type = uri, name = "marker" }].

return_response(Code, Body, State, ExpectedResponseCode, SuccessAtom) ->
return_response(Code, Body, ExpectedResponseCode, SuccessAtom) ->
case Code of
ExpectedResponseCode ->
{ok, SuccessAtom};
Expand Down

0 comments on commit 4f78665

Please sign in to comment.