mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 22:01:38 +02:00
✨ Mark all notifications as read from dashboard (#5805)
* ✨ Mark all notifications as read from dashboard * ♻️ Mark all notifications as read code review * ♻️ Mark all notifications as read code review II
This commit is contained in:
parent
8a332c1402
commit
59a57d6c3f
6 changed files with 64 additions and 2 deletions
|
@ -797,3 +797,18 @@
|
|||
{:id id}
|
||||
{::db/return-keys false})
|
||||
nil))
|
||||
|
||||
(def ^:private
|
||||
schema:mark-all-threads-as-read
|
||||
[:map {:title "mark-all-threads-as-read"}
|
||||
[:threads [:vector ::sm/uuid]]])
|
||||
|
||||
(sv/defmethod ::mark-all-threads-as-read
|
||||
{::doc/added "1.15"
|
||||
::sm/params schema:mark-all-threads-as-read}
|
||||
[cfg {:keys [::rpc/profile-id threads] :as params}]
|
||||
(db/tx-run!
|
||||
cfg
|
||||
(fn [{:keys [::db/conn]}]
|
||||
(doseq [thread-id threads]
|
||||
(upsert-comment-thread-status! conn profile-id thread-id)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue