Исключение при попытке запустить Cloverage с compojure auth middleware - PullRequest
0 голосов
/ 22 ноября 2018

Закрытие теперь перестает работать после добавления аутентификации на основе ролей в мой compojure api.Во время работы lein cloverage я получаю это исключение:

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)

Вот мое промежуточное ПО аутентификации:

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

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

1 Ответ

0 голосов
/ 22 ноября 2018

См. Выпуск 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]))
...