@@ -65,7 +65,7 @@ get(Config, UsernameOrEmail) when is_map(Config) and is_binary(UsernameOrEmail)
6565% % '''
6666% % @end
6767-spec add (hex_core :config (), binary (), role ()) -> hex_api :response ().
68- add (Config , UsernameOrEmail , Role ) when is_map (Config ) and is_binary (UsernameOrEmail ) and is_binary (Role ) ->
68+ add (Config , UsernameOrEmail , Role ) when is_map (Config ) and is_binary (UsernameOrEmail ) and is_atom (Role ) ->
6969 Path = hex_api :build_organization_path (Config , [" members" ]),
7070 Params = #{<<" name" >> => UsernameOrEmail , <<" role" >> => Role },
7171 hex_api :post (Config , Path , Params ).
@@ -86,7 +86,7 @@ add(Config, UsernameOrEmail, Role) when is_map(Config) and is_binary(UsernameOrE
8686% % '''
8787% % @end
8888-spec update (hex_core :config (), binary (), role ()) -> hex_api :response ().
89- update (Config , UsernameOrEmail , Role ) when is_map (Config ) and is_binary (UsernameOrEmail ) and is_binary (Role ) ->
89+ update (Config , UsernameOrEmail , Role ) when is_map (Config ) and is_binary (UsernameOrEmail ) and is_atom (Role ) ->
9090 Path = hex_api :build_organization_path (Config , [" members" , UsernameOrEmail ]),
9191 Params = #{<<" role" >> => Role },
9292 hex_api :post (Config , Path , Params ).
0 commit comments