🎉 Add RPC method for retrieve the list of builtin templates

This commit is contained in:
Andrey Antukh 2022-08-03 14:41:50 +02:00
parent 052404b1b4
commit 6981d92b11
2 changed files with 21 additions and 0 deletions

View file

@ -392,3 +392,12 @@
(assoc ::binfile/ignore-index-errors? true)
(assoc ::binfile/migrate? true)
(binfile/import!))))
;; --- COMMAND: Retrieve list of builtin templates
(s/def ::retrieve-list-of-builtin-templates any?)
(sv/defmethod ::retrieve-list-of-builtin-templates
[cfg _params]
(mapv #(select-keys % [:id :name]) (:templates cfg)))