mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 14:01:40 +02:00
♻️ Refactor frontend code for adapt to new banners.
This commit is contained in:
parent
b331489741
commit
a27828ed79
25 changed files with 387 additions and 369 deletions
|
@ -22,9 +22,11 @@
|
|||
|
||||
;; --- Defaults
|
||||
|
||||
(def default-context
|
||||
(defn default-context
|
||||
[]
|
||||
{:static media/resolve-asset
|
||||
:comment (constantly nil)})
|
||||
:comment (constantly nil)
|
||||
:public-uri (:public-uri cfg/config)})
|
||||
|
||||
;; --- Public API
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@
|
|||
(let [owner-id (:id owner)
|
||||
id (mk-uuid "file" "draft" owner-id index)
|
||||
name (str "file" index)
|
||||
project-id (:default-project owner)]
|
||||
project-id (:default-project-id owner)]
|
||||
(log/info "create draft file" id)
|
||||
(db/insert! conn :file
|
||||
{:id id
|
||||
|
|
|
@ -156,6 +156,9 @@
|
|||
(sm/defmutation ::login
|
||||
[{:keys [email password scope] :as params}]
|
||||
(letfn [(check-password [profile password]
|
||||
(when (= (:password profile) "!")
|
||||
(ex/raise :type :validation
|
||||
:code ::account-without-password))
|
||||
(let [result (sodi.pwhash/verify password (:password profile))]
|
||||
(:valid result)))
|
||||
|
||||
|
|
|
@ -95,7 +95,10 @@
|
|||
(when-let [spec (s/get-spec id)]
|
||||
(s/assert spec context))
|
||||
|
||||
(let [context (merge extra-context context)
|
||||
(let [context (merge (if (fn? extra-context)
|
||||
(extra-context)
|
||||
extra-context)
|
||||
context)
|
||||
email (impl-build-email id context)]
|
||||
(when-not email
|
||||
(ex/raise :type :internal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue