0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

Merge pull request #4636 from penpot/niwinz-bugfix-2

 Minor changes
This commit is contained in:
Alejandro 2024-05-28 08:07:46 +02:00 committed by GitHub
commit c918e06859
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 6 deletions

View file

@ -53,8 +53,7 @@
(assoc (->> sk str/kebab (keyword "penpot")) v))))]
(reduce-kv process-param {} params)))
(def ^:private
profile-props
(def profile-props
[:id
:is-active
:is-muted

View file

@ -110,7 +110,6 @@
::sm/params schema:update-profile
::sm/result schema:profile}
[{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id fullname lang theme] :as params}]
(db/with-atomic [conn pool]
;; NOTE: we need to retrieve the profile independently if we use
;; it or not for explicit locking and avoid concurrent updates of

View file

@ -343,9 +343,9 @@
(watch [_ state _]
(let [on-success (:on-success opts identity)
on-error (:on-error opts rx/throw)
profile (:profile state)]
(->> (rp/cmd! :update-profile (dissoc profile :props))
profile (:profile state)
params (select-keys profile [:fullname :lang :theme])]
(->> (rp/cmd! :update-profile params)
(rx/tap on-success)
(rx/catch on-error))))))