0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 02:28:18 -05:00

🐛 Show proper profile photo just after login.

This commit is contained in:
Andrey Antukh 2020-05-01 09:14:10 +02:00
parent 8446ad13cb
commit a5592dfe04
3 changed files with 4 additions and 3 deletions

View file

@ -89,7 +89,8 @@
(defn- retrieve-profile-by-email
[conn email]
(db/query-one conn [sql:profile-by-email email]))
(-> (db/query-one conn [sql:profile-by-email email])
(p/then #(images/resolve-media-uris % [:photo :photo-uri]))))
;; --- Mutation: Update Profile (own)

View file

@ -94,4 +94,4 @@
(defn strip-private-attrs
"Only selects a publicy visible profile attrs."
[profile]
(select-keys profile [:id :fullname :lang :email :created-at :photo :theme]))
(select-keys profile [:id :fullname :lang :email :created-at :photo :theme :photo-uri]))

View file

@ -65,7 +65,7 @@
(ptk/reify ::clear-user-data
ptk/UpdateEvent
(update [_ state]
(select-keys state [:route :router :session-id]))
(select-keys state [:route :router :session-id :history]))
ptk/WatchEvent
(watch [_ state s]