mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 09:01:37 +02:00
🎉 Add RPC method for retrieve the list of builtin templates
This commit is contained in:
parent
052404b1b4
commit
6981d92b11
2 changed files with 21 additions and 0 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue