Добавлен Swagger #20

This commit is contained in:
2026-05-09 18:15:45 +03:00
parent a34e36b966
commit a35d6f7acc
9 changed files with 419 additions and 51 deletions
+25
View File
@@ -0,0 +1,25 @@
-module(trails).
-export([admin/0, client/0, all/0]).
admin() ->
Modules = [
admin_handler_events,
admin_handler_event_by_id
%% другие админские обработчики с trails/0
],
lists:flatmap(fun trails_from_module/1, Modules).
client() ->
Modules = [
%% пока пусто; добавьте handler_events, handler_event_by_id и др.
],
lists:flatmap(fun trails_from_module/1, Modules).
all() ->
admin() ++ client().
trails_from_module(Module) ->
try Module:trails() of
Trails when is_list(Trails) -> Trails
catch error:undef -> []
end.