0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

💄 Replace us/assert with us/assert! on dashboard data ns

This commit is contained in:
Andrey Antukh 2022-12-07 14:52:07 +01:00
parent 5b9f0ed0b1
commit edaa62b05b

View file

@ -64,7 +64,7 @@
(defn initialize
[{:keys [id] :as params}]
(us/assert ::us/uuid id)
(us/assert! ::us/uuid id)
(ptk/reify ::initialize
ptk/UpdateEvent
(update [_ state]
@ -201,7 +201,7 @@
(defn search
[params]
(us/assert ::search params)
(us/assert! ::search params)
(ptk/reify ::search
ptk/UpdateEvent
(update [_ state]
@ -236,7 +236,7 @@
(defn fetch-files
[{:keys [project-id] :as params}]
(us/assert ::us/uuid project-id)
(us/assert! ::us/uuid project-id)
(ptk/reify ::fetch-files
ptk/WatchEvent
(watch [_ _ _]
@ -347,7 +347,7 @@
(defn toggle-file-select
[{:keys [id project-id] :as file}]
(us/assert ::file file)
(us/assert! ::file file)
(ptk/reify ::toggle-file-select
ptk/UpdateEvent
(update [_ state]
@ -377,7 +377,7 @@
(defn create-team
[{:keys [name] :as params}]
(us/assert string? name)
(us/assert! ::us/string name)
(ptk/reify ::create-team
ptk/WatchEvent
(watch [_ _ _]
@ -394,7 +394,7 @@
(defn create-team-with-invitations
[{:keys [name emails role] :as params}]
(us/assert string? name)
(us/assert! ::us/string name)
(ptk/reify ::create-team-with-invitations
ptk/WatchEvent
(watch [_ _ _]
@ -413,7 +413,7 @@
(defn update-team
[{:keys [id name] :as params}]
(us/assert ::team params)
(us/assert! ::team params)
(ptk/reify ::update-team
ptk/UpdateEvent
(update [_ state]
@ -426,7 +426,7 @@
(defn update-team-photo
[{:keys [file] :as params}]
(us/assert ::di/file file)
(us/assert! ::di/file file)
(ptk/reify ::update-team-photo
ptk/WatchEvent
(watch [_ state _]
@ -447,8 +447,8 @@
(defn update-team-member-role
[{:keys [role member-id] :as params}]
(us/assert ::us/uuid member-id)
(us/assert ::us/keyword role)
(us/assert! ::us/uuid member-id)
(us/assert! ::us/keyword role)
(ptk/reify ::update-team-member-role
ptk/WatchEvent
(watch [_ state _]
@ -461,7 +461,7 @@
(defn delete-team-member
[{:keys [member-id] :as params}]
(us/assert ::us/uuid member-id)
(us/assert! ::us/uuid member-id)
(ptk/reify ::delete-team-member
ptk/WatchEvent
(watch [_ state _]
@ -474,7 +474,9 @@
(defn leave-team
[{:keys [reassign-to] :as params}]
(us/assert (s/nilable ::us/uuid) reassign-to)
(us/assert!
:spec (s/nilable ::us/uuid)
:val reassign-to)
(ptk/reify ::leave-team
ptk/WatchEvent
(watch [_ state _]
@ -510,9 +512,9 @@
(defn update-team-invitation-role
[{:keys [email team-id role] :as params}]
(us/assert ::us/email email)
(us/assert ::us/uuid team-id)
(us/assert ::us/keyword role)
(us/assert! ::us/email email)
(us/assert! ::us/uuid team-id)
(us/assert! ::us/keyword role)
(ptk/reify ::update-team-invitation-role
IDeref
(-deref [_] {:role role})
@ -528,8 +530,8 @@
(defn delete-team-invitation
[{:keys [email team-id] :as params}]
(us/assert ::us/email email)
(us/assert ::us/uuid team-id)
(us/assert! ::us/email email)
(us/assert! ::us/uuid team-id)
(ptk/reify ::delete-team-invitation
ptk/WatchEvent
(watch [_ _ _]
@ -542,7 +544,7 @@
(defn delete-team-webhook
[{:keys [id] :as params}]
(us/assert ::us/uuid id)
(us/assert! ::us/uuid id)
(ptk/reify ::delete-team-webhook
ptk/WatchEvent
(watch [_ state _]
@ -562,10 +564,10 @@
(defn update-team-webhook
[{:keys [id uri mtype is-active] :as params}]
(us/assert ::us/uuid id)
(us/assert ::us/uri uri)
(us/assert ::mtype mtype)
(us/assert ::us/boolean is-active)
(us/assert! ::us/uuid id)
(us/assert! ::us/uri uri)
(us/assert! ::mtype mtype)
(us/assert! ::us/boolean is-active)
(ptk/reify ::update-team-webhook
ptk/WatchEvent
(watch [_ state _]
@ -580,9 +582,9 @@
(defn create-team-webhook
[{:keys [uri mtype is-active] :as params}]
(us/assert ::us/uri uri)
(us/assert ::mtype mtype)
(us/assert ::us/boolean is-active)
(us/assert! ::us/uri uri)
(us/assert! ::mtype mtype)
(us/assert! ::us/boolean is-active)
(ptk/reify ::create-team-webhook
ptk/WatchEvent
(watch [_ state _]
@ -599,7 +601,7 @@
(defn delete-team
[{:keys [id] :as params}]
(us/assert ::team params)
(us/assert! ::team params)
(ptk/reify ::delete-team
ptk/WatchEvent
(watch [_ _ _]
@ -652,7 +654,7 @@
(defn duplicate-project
[{:keys [id name] :as params}]
(us/assert ::us/uuid id)
(us/assert! ::us/uuid id)
(ptk/reify ::duplicate-project
ptk/WatchEvent
(watch [_ _ _]
@ -669,8 +671,8 @@
(defn move-project
[{:keys [id team-id] :as params}]
(us/assert ::us/uuid id)
(us/assert ::us/uuid team-id)
(us/assert! ::us/uuid id)
(us/assert! ::us/uuid team-id)
(ptk/reify ::move-project
IDeref
(-deref [_]
@ -688,7 +690,7 @@
(defn toggle-project-pin
[{:keys [id is-pinned] :as project}]
(us/assert ::project project)
(us/assert! ::project project)
(ptk/reify ::toggle-project-pin
ptk/UpdateEvent
(update [_ state]
@ -705,7 +707,7 @@
(defn rename-project
[{:keys [id name] :as params}]
(us/assert ::project params)
(us/assert! ::project params)
(ptk/reify ::rename-project
ptk/UpdateEvent
(update [_ state]
@ -723,7 +725,7 @@
(defn delete-project
[{:keys [id] :as params}]
(us/assert ::project params)
(us/assert! ::project params)
(ptk/reify ::delete-project
ptk/UpdateEvent
(update [_ state]
@ -745,7 +747,7 @@
(defn delete-file
[{:keys [id project-id] :as params}]
(us/assert ::file params)
(us/assert! ::file params)
(ptk/reify ::delete-file
ptk/UpdateEvent
(update [_ state]
@ -764,7 +766,7 @@
(defn rename-file
[{:keys [id name] :as params}]
(us/assert ::file params)
(us/assert! ::file params)
(ptk/reify ::rename-file
IDeref
(-deref [_]
@ -787,7 +789,7 @@
(defn set-file-shared
[{:keys [id is-shared] :as params}]
(us/assert ::file params)
(us/assert! ::file params)
(ptk/reify ::set-file-shared
IDeref
(-deref [_]
@ -828,7 +830,7 @@
(defn create-file
[{:keys [project-id] :as params}]
(us/assert ::us/uuid project-id)
(us/assert! ::us/uuid project-id)
(ptk/reify ::create-file
IDeref
@ -857,8 +859,8 @@
(defn duplicate-file
[{:keys [id name] :as params}]
(us/assert ::us/uuid id)
(us/assert ::name name)
(us/assert! ::us/uuid id)
(us/assert! ::name name)
(ptk/reify ::duplicate-file
ptk/WatchEvent
(watch [_ _ _]
@ -877,8 +879,8 @@
(defn move-files
[{:keys [ids project-id] :as params}]
(us/assert ::us/set-of-uuid ids)
(us/assert ::us/uuid project-id)
(us/assert! ::us/set-of-uuid ids)
(us/assert! ::us/uuid project-id)
(ptk/reify ::move-files
IDeref
(-deref [_]
@ -898,7 +900,7 @@
;; --- EVENT: clone-template
(defn clone-template
[{:keys [template-id project-id] :as params}]
(us/assert ::us/uuid project-id)
(us/assert! ::us/uuid project-id)
(ptk/reify ::clone-template
IDeref
(-deref [_]
@ -920,7 +922,7 @@
(defn go-to-workspace
[{:keys [id project-id] :as file}]
(us/assert ::file file)
(us/assert! ::file file)
(ptk/reify ::go-to-workspace
ptk/WatchEvent
(watch [_ _ _]