Skip to content

Commit e0f8670

Browse files
committed
Handle the special case /vhosts/root
1 parent 7e4f8f3 commit e0f8670

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rest/controllers/vhosts.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
% list_vhosts
88

99
get([]) -> {?MODULE, get_all_vhosts()};
10+
get(["root"]) -> ?MODULE:get(["/"]);
1011
get([Id]) ->
1112
Vhosts = lists:map(fun(U) -> erlang:binary_to_list(U) end, get_all_vhosts()),
1213
case lists:member(Id, Vhosts) of
@@ -40,4 +41,4 @@ get_all_vhosts() ->
4041
case rabint:call({rabbit_access_control, list_vhosts, []}) of
4142
{_Error, _} -> erlang:list_to_binary([<<"no vhosts">>]);
4243
Bin -> Bin
43-
end.
44+
end.

0 commit comments

Comments
 (0)