MSPF-320: Describe empty TODOs

This commit is contained in:
Andrey Mayorov 2017-12-18 20:14:16 +03:00 committed by Andrew Mayorov
parent 09a5208817
commit a964251f32
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
% TODO
% Extend interface to support proper keystore manipulation. Refactor it into a more
% general library along with `shortener_acl` and some parts of `shortener_auth`.
-module(shortener_authorizer_jwt).
%%
@ -6,8 +10,6 @@
-export([init/1]).
-export([store_key/2]).
% TODO
% Extend interface to support proper keystore manipulation
-export([issue/2]).
-export([verify/1]).

View File

@ -173,10 +173,14 @@ parse_timestamp(Timestamp) ->
get_short_url_template() ->
% TODO
% Teach the swagger-codegen bastard to behave and accept handler options
% upon initialization
maps:get(short_url_template, genlib_app:env(shortener, api)).
get_source_url_whitelist() ->
% TODO
% Teach the swagger-codegen bastard to behave and accept handler options
% upon initialization
maps:get(source_url_whitelist, genlib_app:env(shortener, api), []).
%%

View File

@ -130,6 +130,7 @@ failed_authorization(C) ->
Params = construct_params(<<"https://oops.io/">>),
C1 = clean_api_auth_token(C),
% TODO
% Schema should allow `401` explicitly
{error, {invalid_response_code, 401}} = shorten_url(Params, C1),
{error, {invalid_response_code, 401}} = delete_shortened_url(<<"42">>, C1),
{error, {invalid_response_code, 401}} = get_shortened_url(<<"42">>, C1).