mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 12:28:54 -05:00
✨ Minor adaptations for tests of profile creation function.
This commit is contained in:
parent
2c05a82204
commit
5751ac6b4e
1 changed files with 4 additions and 2 deletions
|
@ -160,10 +160,12 @@
|
|||
(defn- create-profile
|
||||
"Create the profile entry on the database with limited input
|
||||
filling all the other fields with defaults."
|
||||
[conn {:keys [id fullname email password demo? props] :as params}]
|
||||
[conn {:keys [id fullname email password demo? props is-active]
|
||||
:or {is-active false}
|
||||
:as params}]
|
||||
(let [id (or id (uuid/next))
|
||||
demo? (if (boolean? demo?) demo? false)
|
||||
active? (if demo? true false)
|
||||
active? (if demo? true is-active)
|
||||
props (db/tjson (or props {}))
|
||||
password (derive-password password)]
|
||||
(-> (db/insert! conn :profile
|
||||
|
|
Loading…
Add table
Reference in a new issue