mirror of
https://github.com/penpot/penpot.git
synced 2025-07-23 13:07:23 +02:00
♻️ Refactor exportation and duplicate mechanism
Previously the file processing was implemented 3 times using similar approaches bug each own with its own bugs. This PR unifies the loging to a single implementation used by the 3 operations.
This commit is contained in:
parent
a85a7c74c3
commit
7f60946204
12 changed files with 1587 additions and 1858 deletions
|
@ -416,14 +416,16 @@
|
|||
;; namespace too.
|
||||
|
||||
(defn create-project
|
||||
[conn {:keys [id team-id name is-default] :as params}]
|
||||
[conn {:keys [id team-id name is-default created-at modified-at]}]
|
||||
(let [id (or id (uuid/next))
|
||||
is-default (if (boolean? is-default) is-default false)]
|
||||
(db/insert! conn :project
|
||||
{:id id
|
||||
:name name
|
||||
:team-id team-id
|
||||
:is-default is-default})))
|
||||
is-default (if (boolean? is-default) is-default false)
|
||||
params {:id id
|
||||
:name name
|
||||
:team-id team-id
|
||||
:is-default is-default
|
||||
:created-at created-at
|
||||
:modified-at modified-at}]
|
||||
(db/insert! conn :project (d/without-nils params))))
|
||||
|
||||
(defn create-project-role
|
||||
[conn profile-id project-id role]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue