feat: PATCH /v1/user/me — профиль и смена пароля. Refs EventHub/EventHubBack#48
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
client_get/2,
|
||||
client_post/3,
|
||||
client_put/3,
|
||||
client_patch/3,
|
||||
client_delete/2,
|
||||
admin_patch/3]).
|
||||
-export([verify_user/2]).
|
||||
@@ -314,6 +315,12 @@ client_put(Path, Token, BodyMap) ->
|
||||
{ok, 200, _, RespBody} = client_request(put, Path, Token, Body),
|
||||
jsx:decode(list_to_binary(RespBody), [return_maps]).
|
||||
|
||||
-spec client_patch(binary(), binary(), map()) -> jsx:json_term().
|
||||
client_patch(Path, Token, BodyMap) ->
|
||||
Body = jsx:encode(BodyMap),
|
||||
{ok, 200, _, RespBody} = client_request(patch, Path, Token, Body),
|
||||
jsx:decode(list_to_binary(RespBody), [return_maps]).
|
||||
|
||||
-spec client_delete(binary(), binary()) -> jsx:json_term().
|
||||
client_delete(Path, Token) ->
|
||||
{ok, 200, _, Body} = client_request(delete, Path, Token),
|
||||
|
||||
Reference in New Issue
Block a user