Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
skydread1 committed Jul 25, 2023
1 parent a13735a commit 11b55b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions client/web/src/flybot/client/web/core/dom/page/admin.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

;;---------- From ----------

(defn grant-role-from
(defn grant-role-form
[role]
(let [role-str (name role)
for-val (str "add-role" role-str)]
Expand Down Expand Up @@ -48,11 +48,11 @@
[:div
[:form
[submit-role-button :admin]]
[grant-role-from :admin]]
[grant-role-form :admin]]
[:div
[:form
[submit-role-button :owner]]
[grant-role-from :owner]]]
[grant-role-form :owner]]]
[:div
[:h2 "You do not have the required permissions."]
[:p "This section is dedicated to the owners of the website."]])])
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
role-form (rf/subscribe [:subs/pattern '{:form.role/fields ?x}])
errors (rf/subscribe [:subs/pattern '{:app/errors ?x}])]

;;---------- GRANT ROLE ROLE ERROR
;;---------- GRANT ROLE ERROR
(rf/dispatch [:evt.role.form/set-field :admin :user/email "email@wrong.com"])
;; Send role but validation error
(rf/dispatch [:evt.user.form/grant-role :admin])
(testing "Form not cleared and error added to db."
(is @role-form)
(is @errors))

;;---------- GRANT ROLE ROLE SUCCESS
;;---------- GRANT ROLE SUCCESS
(rf/reg-fx :http-xhrio
(fn [_] (rf/dispatch
[:fx.http/grant-role-success
Expand Down

0 comments on commit 11b55b8

Please sign in to comment.