0

Cloverage is now failing after I adding role based authentication to my compojure api. Whilst running lein cloverage I get this exception:

Exception in thread "main" java.lang.IllegalArgumentException: No method in multimethod 'restructure-param' for dispatch value: :auth-roles, compiling:(/private/var/folders/w_/yt926bqs21g44f257yz05ctsjbv948/T/form-init3368607975292148784.clj:1:125)

Here is my auth middleware:

(defmethod compojure.api.meta/restructure-param :auth-roles
[_ required-roles acc]

(update-in acc [:middleware] conj [require-roles required-roles]))
4

1 回答 1

0

见github问题:https ://github.com/cloverage/cloverage/issues/164#issuecomment-281673566

(defmethod compojure.api.meta/restructure-param :auth-roles
  [_ required-roles acc]

  (update-in acc [:middleware] conj [`require-roles required-roles]))
于 2018-11-22T17:02:19.533 回答